| 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 if (!launched) | 312 if (!launched) |
| 313 handle = base::kNullProcessHandle; | 313 handle = base::kNullProcessHandle; |
| 314 | 314 |
| 315 #if defined(OS_MACOSX) | 315 #if defined(OS_MACOSX) |
| 316 if (ShouldEnableBootstrapSandbox() && | 316 if (ShouldEnableBootstrapSandbox() && |
| 317 bootstrap_sandbox_policy != SANDBOX_TYPE_INVALID) { | 317 bootstrap_sandbox_policy != SANDBOX_TYPE_INVALID) { |
| 318 GetBootstrapSandbox()->FinishedFork(handle); | 318 GetBootstrapSandbox()->FinishedFork(handle); |
| 319 } | 319 } |
| 320 | 320 |
| 321 if (launched) | 321 if (launched) |
| 322 broker->AddPlaceholderForPid(handle); | 322 broker->AddPlaceholderForPid(handle, child_process_id); |
| 323 | 323 |
| 324 // After updating the broker, release the lock and let the child's | 324 // After updating the broker, release the lock and let the child's |
| 325 // messasge be processed on the broker's thread. | 325 // messasge be processed on the broker's thread. |
| 326 broker->GetLock().Release(); | 326 broker->GetLock().Release(); |
| 327 #endif // defined(OS_MACOSX) | 327 #endif // defined(OS_MACOSX) |
| 328 } | 328 } |
| 329 #endif // else defined(OS_POSIX) | 329 #endif // else defined(OS_POSIX) |
| 330 #if !defined(OS_ANDROID) | 330 #if !defined(OS_ANDROID) |
| 331 if (handle) | 331 if (handle) |
| 332 RecordHistograms(begin_launch_time); | 332 RecordHistograms(begin_launch_time); |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 context_->SetProcessBackgrounded(background); | 524 context_->SetProcessBackgrounded(background); |
| 525 } | 525 } |
| 526 | 526 |
| 527 void ChildProcessLauncher::SetTerminateChildOnShutdown( | 527 void ChildProcessLauncher::SetTerminateChildOnShutdown( |
| 528 bool terminate_on_shutdown) { | 528 bool terminate_on_shutdown) { |
| 529 if (context_.get()) | 529 if (context_.get()) |
| 530 context_->set_terminate_child_on_shutdown(terminate_on_shutdown); | 530 context_->set_terminate_child_on_shutdown(terminate_on_shutdown); |
| 531 } | 531 } |
| 532 | 532 |
| 533 } // namespace content | 533 } // namespace content |
| OLD | NEW |