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/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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 if (!launched) | 422 if (!launched) |
423 handle = base::kNullProcessHandle; | 423 handle = base::kNullProcessHandle; |
424 | 424 |
425 #if defined(OS_MACOSX) | 425 #if defined(OS_MACOSX) |
426 if (ShouldEnableBootstrapSandbox() && | 426 if (ShouldEnableBootstrapSandbox() && |
427 bootstrap_sandbox_policy != SANDBOX_TYPE_INVALID) { | 427 bootstrap_sandbox_policy != SANDBOX_TYPE_INVALID) { |
428 GetBootstrapSandbox()->FinishedFork(handle); | 428 GetBootstrapSandbox()->FinishedFork(handle); |
429 } | 429 } |
430 | 430 |
431 if (launched) | 431 if (launched) |
432 broker->AddPlaceholderForPid(handle); | 432 broker->AddPlaceholderForPid(handle, child_process_id); |
433 | 433 |
434 // After updating the broker, release the lock and let the child's | 434 // After updating the broker, release the lock and let the child's |
435 // messasge be processed on the broker's thread. | 435 // messasge be processed on the broker's thread. |
436 broker->GetLock().Release(); | 436 broker->GetLock().Release(); |
437 #endif // defined(OS_MACOSX) | 437 #endif // defined(OS_MACOSX) |
438 } | 438 } |
439 #endif // else defined(OS_POSIX) | 439 #endif // else defined(OS_POSIX) |
440 #if !defined(OS_ANDROID) | 440 #if !defined(OS_ANDROID) |
441 if (handle) | 441 if (handle) |
442 RecordHistograms(begin_launch_time); | 442 RecordHistograms(begin_launch_time); |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 context_->SetProcessBackgrounded(background); | 593 context_->SetProcessBackgrounded(background); |
594 } | 594 } |
595 | 595 |
596 void ChildProcessLauncher::SetTerminateChildOnShutdown( | 596 void ChildProcessLauncher::SetTerminateChildOnShutdown( |
597 bool terminate_on_shutdown) { | 597 bool terminate_on_shutdown) { |
598 if (context_.get()) | 598 if (context_.get()) |
599 context_->set_terminate_child_on_shutdown(terminate_on_shutdown); | 599 context_->set_terminate_child_on_shutdown(terminate_on_shutdown); |
600 } | 600 } |
601 | 601 |
602 } // namespace content | 602 } // namespace content |
OLD | NEW |