| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/browser_main_loop.h" | 5 #include "content/browser/browser_main_loop.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 namespace { | 126 namespace { |
| 127 | 127 |
| 128 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) | 128 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
| 129 void SetupSandbox(const CommandLine& parsed_command_line) { | 129 void SetupSandbox(const CommandLine& parsed_command_line) { |
| 130 TRACE_EVENT0("startup", "SetupSandbox"); | 130 TRACE_EVENT0("startup", "SetupSandbox"); |
| 131 base::FilePath sandbox_binary; | 131 base::FilePath sandbox_binary; |
| 132 | 132 |
| 133 scoped_ptr<sandbox::SetuidSandboxClient> setuid_sandbox_client( | 133 scoped_ptr<sandbox::SetuidSandboxClient> setuid_sandbox_client( |
| 134 sandbox::SetuidSandboxClient::Create()); | 134 sandbox::SetuidSandboxClient::Create()); |
| 135 | 135 |
| 136 const bool want_setuid_sandbox = false && | 136 const bool want_setuid_sandbox = |
| 137 !parsed_command_line.HasSwitch(switches::kNoSandbox) && | 137 !parsed_command_line.HasSwitch(switches::kNoSandbox) && |
| 138 !parsed_command_line.HasSwitch(switches::kDisableSetuidSandbox) && | 138 !parsed_command_line.HasSwitch(switches::kDisableSetuidSandbox) && |
| 139 !setuid_sandbox_client->IsDisabledViaEnvironment(); | 139 !setuid_sandbox_client->IsDisabledViaEnvironment(); |
| 140 | 140 |
| 141 static const char no_suid_error[] = | 141 static const char no_suid_error[] = |
| 142 "Running without the SUID sandbox! See " | 142 "Running without the SUID sandbox! See " |
| 143 "https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment " | 143 "https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment " |
| 144 "for more information on developing with the sandbox on."; | 144 "for more information on developing with the sandbox on."; |
| 145 if (want_setuid_sandbox) { | 145 if (want_setuid_sandbox) { |
| 146 sandbox_binary = setuid_sandbox_client->GetSandboxBinaryPath(); | 146 sandbox_binary = setuid_sandbox_client->GetSandboxBinaryPath(); |
| (...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1099 base::TimeDelta::FromSeconds(delay_secs)); | 1099 base::TimeDelta::FromSeconds(delay_secs)); |
| 1100 } | 1100 } |
| 1101 | 1101 |
| 1102 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) { | 1102 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) { |
| 1103 is_tracing_startup_ = false; | 1103 is_tracing_startup_ = false; |
| 1104 TracingController::GetInstance()->DisableRecording( | 1104 TracingController::GetInstance()->DisableRecording( |
| 1105 trace_file, base::Bind(&OnStoppedStartupTracing)); | 1105 trace_file, base::Bind(&OnStoppedStartupTracing)); |
| 1106 } | 1106 } |
| 1107 | 1107 |
| 1108 } // namespace content | 1108 } // namespace content |
| OLD | NEW |