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

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

Issue 759903002: Upgrade the windows specific version of LaunchProcess to avoid raw handles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chrome build Created 6 years 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 | « components/storage_monitor/storage_monitor_linux.cc ('k') | content/zygote/zygote_linux.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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 process.Terminate(RESULT_CODE_NORMAL_EXIT); 524 process.Terminate(RESULT_CODE_NORMAL_EXIT);
525 // On POSIX, we must additionally reap the child. 525 // On POSIX, we must additionally reap the child.
526 #if defined(OS_POSIX) 526 #if defined(OS_POSIX)
527 #if !defined(OS_MACOSX) 527 #if !defined(OS_MACOSX)
528 if (zygote) { 528 if (zygote) {
529 // If the renderer was created via a zygote, we have to proxy the reaping 529 // If the renderer was created via a zygote, we have to proxy the reaping
530 // through the zygote process. 530 // through the zygote process.
531 ZygoteHostImpl::GetInstance()->EnsureProcessTerminated(process.Handle()); 531 ZygoteHostImpl::GetInstance()->EnsureProcessTerminated(process.Handle());
532 } else 532 } else
533 #endif // !OS_MACOSX 533 #endif // !OS_MACOSX
534 base::EnsureProcessTerminated(process.Handle()); 534 base::EnsureProcessTerminated(process.Pass());
535 #endif // OS_POSIX 535 #endif // OS_POSIX
536 #endif // defined(OS_ANDROID) 536 #endif // defined(OS_ANDROID)
537 } 537 }
538 538
539 // ----------------------------------------------------------------------------- 539 // -----------------------------------------------------------------------------
540 540
541 ChildProcessLauncher::ChildProcessLauncher( 541 ChildProcessLauncher::ChildProcessLauncher(
542 SandboxedProcessLauncherDelegate* delegate, 542 SandboxedProcessLauncherDelegate* delegate,
543 base::CommandLine* cmd_line, 543 base::CommandLine* cmd_line,
544 int child_process_id, 544 int child_process_id,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 context_->SetProcessBackgrounded(background); 594 context_->SetProcessBackgrounded(background);
595 } 595 }
596 596
597 void ChildProcessLauncher::SetTerminateChildOnShutdown( 597 void ChildProcessLauncher::SetTerminateChildOnShutdown(
598 bool terminate_on_shutdown) { 598 bool terminate_on_shutdown) {
599 if (context_.get()) 599 if (context_.get())
600 context_->set_terminate_child_on_shutdown(terminate_on_shutdown); 600 context_->set_terminate_child_on_shutdown(terminate_on_shutdown);
601 } 601 }
602 602
603 } // namespace content 603 } // namespace content
OLDNEW
« no previous file with comments | « components/storage_monitor/storage_monitor_linux.cc ('k') | content/zygote/zygote_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698