| 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/feature_list.h" | 9 #include "base/feature_list.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 scoped_ptr<sandbox::SetuidSandboxHost> setuid_sandbox_host( | 196 scoped_ptr<sandbox::SetuidSandboxHost> setuid_sandbox_host( |
| 197 sandbox::SetuidSandboxHost::Create()); | 197 sandbox::SetuidSandboxHost::Create()); |
| 198 | 198 |
| 199 const bool want_setuid_sandbox = | 199 const bool want_setuid_sandbox = |
| 200 !parsed_command_line.HasSwitch(switches::kNoSandbox) && | 200 !parsed_command_line.HasSwitch(switches::kNoSandbox) && |
| 201 !parsed_command_line.HasSwitch(switches::kDisableSetuidSandbox) && | 201 !parsed_command_line.HasSwitch(switches::kDisableSetuidSandbox) && |
| 202 !setuid_sandbox_host->IsDisabledViaEnvironment(); | 202 !setuid_sandbox_host->IsDisabledViaEnvironment(); |
| 203 | 203 |
| 204 static const char no_suid_error[] = | 204 static const char no_suid_error[] = |
| 205 "Running without the SUID sandbox! See " | 205 "Running without the SUID sandbox! See " |
| 206 "https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment " | 206 "https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_s
andbox_development.md " |
| 207 "for more information on developing with the sandbox on."; | 207 "for more information on developing with the sandbox on."; |
| 208 if (want_setuid_sandbox) { | 208 if (want_setuid_sandbox) { |
| 209 sandbox_binary = setuid_sandbox_host->GetSandboxBinaryPath(); | 209 sandbox_binary = setuid_sandbox_host->GetSandboxBinaryPath(); |
| 210 if (sandbox_binary.empty()) { | 210 if (sandbox_binary.empty()) { |
| 211 // This needs to be fatal. Talk to security@chromium.org if you feel | 211 // This needs to be fatal. Talk to security@chromium.org if you feel |
| 212 // otherwise. | 212 // otherwise. |
| 213 LOG(FATAL) << no_suid_error; | 213 LOG(FATAL) << no_suid_error; |
| 214 } | 214 } |
| 215 } else { | 215 } else { |
| 216 LOG(ERROR) << no_suid_error; | 216 LOG(ERROR) << no_suid_error; |
| (...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1473 DCHECK(is_tracing_startup_for_duration_); | 1473 DCHECK(is_tracing_startup_for_duration_); |
| 1474 | 1474 |
| 1475 is_tracing_startup_for_duration_ = false; | 1475 is_tracing_startup_for_duration_ = false; |
| 1476 TracingController::GetInstance()->StopTracing( | 1476 TracingController::GetInstance()->StopTracing( |
| 1477 TracingController::CreateFileSink( | 1477 TracingController::CreateFileSink( |
| 1478 startup_trace_file_, | 1478 startup_trace_file_, |
| 1479 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1479 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
| 1480 } | 1480 } |
| 1481 | 1481 |
| 1482 } // namespace content | 1482 } // namespace content |
| OLD | NEW |