Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 2384163002: Add a --no-zygote command line flag (Closed)
Patch Set: Better error message Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/child_process_launcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 #ifdef DestroyAll 200 #ifdef DestroyAll
201 #undef DestroyAll 201 #undef DestroyAll
202 #endif 202 #endif
203 203
204 namespace content { 204 namespace content {
205 namespace { 205 namespace {
206 206
207 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) 207 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
208 void SetupSandbox(const base::CommandLine& parsed_command_line) { 208 void SetupSandbox(const base::CommandLine& parsed_command_line) {
209 TRACE_EVENT0("startup", "SetupSandbox"); 209 TRACE_EVENT0("startup", "SetupSandbox");
210 if (parsed_command_line.HasSwitch(switches::kNoZygote)) {
211 CHECK(parsed_command_line.HasSwitch(switches::kNoSandbox))
212 << "--no-sandbox should be used together with --no--zygote";
213 return;
214 }
210 215
211 // Tickle the sandbox host and zygote host so they fork now. 216 // Tickle the sandbox host and zygote host so they fork now.
212 RenderSandboxHostLinux::GetInstance()->Init(); 217 RenderSandboxHostLinux::GetInstance()->Init();
213 ZygoteHostImpl::GetInstance()->Init(parsed_command_line); 218 ZygoteHostImpl::GetInstance()->Init(parsed_command_line);
214 *GetGenericZygote() = CreateZygote(); 219 *GetGenericZygote() = CreateZygote();
215 RenderProcessHostImpl::EarlyZygoteLaunch(); 220 RenderProcessHostImpl::EarlyZygoteLaunch();
216 } 221 }
217 #endif 222 #endif
218 223
219 #if defined(USE_GLIB) 224 #if defined(USE_GLIB)
(...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = 1569 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner =
1565 audio_thread_->task_runner(); 1570 audio_thread_->task_runner();
1566 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), 1571 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner),
1567 std::move(worker_task_runner), 1572 std::move(worker_task_runner),
1568 MediaInternals::GetInstance()); 1573 MediaInternals::GetInstance());
1569 } 1574 }
1570 CHECK(audio_manager_); 1575 CHECK(audio_manager_);
1571 } 1576 }
1572 1577
1573 } // namespace content 1578 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/child_process_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698