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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 if (!launched) | 388 if (!launched) |
389 handle = base::kNullProcessHandle; | 389 handle = base::kNullProcessHandle; |
390 | 390 |
391 #if defined(OS_MACOSX) | 391 #if defined(OS_MACOSX) |
392 if (ShouldEnableBootstrapSandbox() && | 392 if (ShouldEnableBootstrapSandbox() && |
393 bootstrap_sandbox_policy != SANDBOX_TYPE_INVALID) { | 393 bootstrap_sandbox_policy != SANDBOX_TYPE_INVALID) { |
394 GetBootstrapSandbox()->FinishedFork(handle); | 394 GetBootstrapSandbox()->FinishedFork(handle); |
395 } | 395 } |
396 | 396 |
397 if (launched) | 397 if (launched) |
398 broker->AddPlaceholderForPid(handle); | 398 broker->AddPlaceholderForPid(handle, child_process_id); |
399 | 399 |
400 // After updating the broker, release the lock and let the child's | 400 // After updating the broker, release the lock and let the child's |
401 // messasge be processed on the broker's thread. | 401 // messasge be processed on the broker's thread. |
402 broker->GetLock().Release(); | 402 broker->GetLock().Release(); |
403 #endif // defined(OS_MACOSX) | 403 #endif // defined(OS_MACOSX) |
404 } | 404 } |
405 #endif // else defined(OS_POSIX) | 405 #endif // else defined(OS_POSIX) |
406 #if !defined(OS_ANDROID) | 406 #if !defined(OS_ANDROID) |
407 if (handle) | 407 if (handle) |
408 RecordHistograms(begin_launch_time); | 408 RecordHistograms(begin_launch_time); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 context_->SetProcessBackgrounded(background); | 583 context_->SetProcessBackgrounded(background); |
584 } | 584 } |
585 | 585 |
586 void ChildProcessLauncher::SetTerminateChildOnShutdown( | 586 void ChildProcessLauncher::SetTerminateChildOnShutdown( |
587 bool terminate_on_shutdown) { | 587 bool terminate_on_shutdown) { |
588 if (context_.get()) | 588 if (context_.get()) |
589 context_->set_terminate_child_on_shutdown(terminate_on_shutdown); | 589 context_->set_terminate_child_on_shutdown(terminate_on_shutdown); |
590 } | 590 } |
591 | 591 |
592 } // namespace content | 592 } // namespace content |
OLD | NEW |