| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 #undef DestroyAll | 213 #undef DestroyAll |
| 214 #endif | 214 #endif |
| 215 | 215 |
| 216 namespace content { | 216 namespace content { |
| 217 namespace { | 217 namespace { |
| 218 | 218 |
| 219 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) | 219 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
| 220 void SetupSandbox(const base::CommandLine& parsed_command_line) { | 220 void SetupSandbox(const base::CommandLine& parsed_command_line) { |
| 221 TRACE_EVENT0("startup", "SetupSandbox"); | 221 TRACE_EVENT0("startup", "SetupSandbox"); |
| 222 if (parsed_command_line.HasSwitch(switches::kNoZygote)) { | 222 if (parsed_command_line.HasSwitch(switches::kNoZygote)) { |
| 223 CHECK(parsed_command_line.HasSwitch(switches::kNoSandbox)) | 223 // --no-sandbox should be used together with --no--zygote |
| 224 << "--no-sandbox should be used together with --no--zygote"; | 224 CHECK(parsed_command_line.HasSwitch(switches::kNoSandbox)); |
| 225 return; | 225 return; |
| 226 } | 226 } |
| 227 | 227 |
| 228 // Tickle the sandbox host and zygote host so they fork now. | 228 // Tickle the sandbox host and zygote host so they fork now. |
| 229 RenderSandboxHostLinux::GetInstance()->Init(); | 229 RenderSandboxHostLinux::GetInstance()->Init(); |
| 230 ZygoteHostImpl::GetInstance()->Init(parsed_command_line); | 230 ZygoteHostImpl::GetInstance()->Init(parsed_command_line); |
| 231 *GetGenericZygote() = CreateZygote(); | 231 *GetGenericZygote() = CreateZygote(); |
| 232 RenderProcessHostImpl::EarlyZygoteLaunch(); | 232 RenderProcessHostImpl::EarlyZygoteLaunch(); |
| 233 } | 233 } |
| 234 #endif | 234 #endif |
| (...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1701 if (!audio_manager_) { | 1701 if (!audio_manager_) { |
| 1702 audio_thread_ = base::MakeUnique<AudioDeviceThread>(); | 1702 audio_thread_ = base::MakeUnique<AudioDeviceThread>(); |
| 1703 audio_manager_ = media::AudioManager::Create( | 1703 audio_manager_ = media::AudioManager::Create( |
| 1704 audio_thread_->GetTaskRunner(), audio_thread_->worker_task_runner(), | 1704 audio_thread_->GetTaskRunner(), audio_thread_->worker_task_runner(), |
| 1705 MediaInternals::GetInstance()); | 1705 MediaInternals::GetInstance()); |
| 1706 } | 1706 } |
| 1707 CHECK(audio_manager_); | 1707 CHECK(audio_manager_); |
| 1708 } | 1708 } |
| 1709 | 1709 |
| 1710 } // namespace content | 1710 } // namespace content |
| OLD | NEW |