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

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

Issue 347783002: Alter the design of the bootstrap sandbox to only take over the bootstrap port of children when nec… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/bootstrap_sandbox_mac.cc ('k') | content/browser/plugin_process_host.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/child_process_launcher.h" 5 #include "content/browser/child_process_launcher.h"
6 6
7 #include <utility> // For std::pair. 7 #include <utility> // For std::pair.
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 MachBroker* broker = MachBroker::GetInstance(); 281 MachBroker* broker = MachBroker::GetInstance();
282 broker->GetLock().Acquire(); 282 broker->GetLock().Acquire();
283 283
284 // Make sure the MachBroker is running, and inform it to expect a 284 // Make sure the MachBroker is running, and inform it to expect a
285 // check-in from the new process. 285 // check-in from the new process.
286 broker->EnsureRunning(); 286 broker->EnsureRunning();
287 287
288 const int bootstrap_sandbox_policy = delegate->GetSandboxType(); 288 const int bootstrap_sandbox_policy = delegate->GetSandboxType();
289 if (ShouldEnableBootstrapSandbox() && 289 if (ShouldEnableBootstrapSandbox() &&
290 bootstrap_sandbox_policy != SANDBOX_TYPE_INVALID) { 290 bootstrap_sandbox_policy != SANDBOX_TYPE_INVALID) {
291 options.replacement_bootstrap_name =
292 GetBootstrapSandbox()->server_bootstrap_name();
291 GetBootstrapSandbox()->PrepareToForkWithPolicy( 293 GetBootstrapSandbox()->PrepareToForkWithPolicy(
292 bootstrap_sandbox_policy); 294 bootstrap_sandbox_policy);
293 } 295 }
294 #endif // defined(OS_MACOSX) 296 #endif // defined(OS_MACOSX)
295 297
296 bool launched = base::LaunchProcess(*cmd_line, options, &handle); 298 bool launched = base::LaunchProcess(*cmd_line, options, &handle);
297 if (!launched) 299 if (!launched)
298 handle = base::kNullProcessHandle; 300 handle = base::kNullProcessHandle;
299 301
300 #if defined(OS_MACOSX) 302 #if defined(OS_MACOSX)
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 GetHandle(), background)); 517 GetHandle(), background));
516 } 518 }
517 519
518 void ChildProcessLauncher::SetTerminateChildOnShutdown( 520 void ChildProcessLauncher::SetTerminateChildOnShutdown(
519 bool terminate_on_shutdown) { 521 bool terminate_on_shutdown) {
520 if (context_.get()) 522 if (context_.get())
521 context_->set_terminate_child_on_shutdown(terminate_on_shutdown); 523 context_->set_terminate_child_on_shutdown(terminate_on_shutdown);
522 } 524 }
523 525
524 } // namespace content 526 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/bootstrap_sandbox_mac.cc ('k') | content/browser/plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698