summaryrefslogtreecommitdiff
path: root/content/browser/browser_main_loop.cc
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2013-06-19 11:58:07 +0100
committerTorne (Richard Coles) <torne@google.com>2013-06-19 11:58:07 +0100
commit7d4cd473f85ac64c3747c96c277f9e506a0d2246 (patch)
treef5fecd524f5ac22cd38bcc6713b81f666730d5a1 /content/browser/browser_main_loop.cc
parent84f2b2352908c30e40ae12ffe850dd8470f6c048 (diff)
downloadchromium_org-7d4cd473f85ac64c3747c96c277f9e506a0d2246.tar.gz
Merge from Chromium at DEPS revision r207203
This commit was generated by merge_to_master.py. Change-Id: I5fbb6854d092096c4d39edc2865a48be1b53c418
Diffstat (limited to 'content/browser/browser_main_loop.cc')
-rw-r--r--content/browser/browser_main_loop.cc17
1 files changed, 14 insertions, 3 deletions
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index b225da457f..742d675d03 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -126,9 +126,22 @@ void SetupSandbox(const CommandLine& parsed_command_line) {
sandbox_binary = LINUX_SANDBOX_PATH;
#endif
+ const bool want_setuid_sandbox =
+ !parsed_command_line.HasSwitch(switches::kNoSandbox) &&
+ !parsed_command_line.HasSwitch(switches::kDisableSetuidSandbox);
+
+ if (want_setuid_sandbox && !sandbox_binary) {
+ // TODO(jln): make this fatal (crbug.com/245376).
+ LOG(ERROR) << "Running without the SUID sandbox! See "
+ "https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment "
+ "for more information on developing with the sandbox on.\n"
+ "This check will be made FATAL. Do it!";
+ }
+
std::string sandbox_cmd;
- if (sandbox_binary && !parsed_command_line.HasSwitch(switches::kNoSandbox))
+ if (want_setuid_sandbox && sandbox_binary) {
sandbox_cmd = sandbox_binary;
+ }
// Tickle the sandbox host and zygote host so they fork now.
RenderSandboxHostLinux::GetInstance()->Init(sandbox_cmd);
@@ -811,7 +824,6 @@ void BrowserMainLoop::BrowserThreadsStarted() {
// Initialize the GpuDataManager before we set up the MessageLoops because
// otherwise we'll trigger the assertion about doing IO on the UI thread.
GpuDataManagerImpl::GetInstance()->Initialize();
-#endif // !OS_IOS
{
TRACE_EVENT0("startup",
@@ -819,7 +831,6 @@ void BrowserMainLoop::BrowserThreadsStarted() {
speech_recognition_manager_.reset(new SpeechRecognitionManagerImpl());
}
-#if !defined(OS_IOS)
// Alert the clipboard class to which threads are allowed to access the
// clipboard:
std::vector<base::PlatformThreadId> allowed_clipboard_threads;