| Index: content/browser/child_process_launcher_impl.cc
|
| diff --git a/content/browser/child_process_launcher.cc b/content/browser/child_process_launcher_impl.cc
|
| similarity index 94%
|
| copy from content/browser/child_process_launcher.cc
|
| copy to content/browser/child_process_launcher_impl.cc
|
| index 721cd5a88ede6cc6eeb7907bdecbfd35b7a5ff6d..079e81da53546ffa52e3f85c8b500e858666ca35 100644
|
| --- a/content/browser/child_process_launcher.cc
|
| +++ b/content/browser/child_process_launcher_impl.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "content/browser/child_process_launcher.h"
|
| +#include "content/browser/child_process_launcher_impl.h"
|
|
|
| #include <utility> // For std::pair.
|
|
|
| @@ -47,8 +47,8 @@ namespace content {
|
| // Having the functionality of ChildProcessLauncher be in an internal
|
| // ref counted object allows us to automatically terminate the process when the
|
| // parent class destructs, while still holding on to state that we need.
|
| -class ChildProcessLauncher::Context
|
| - : public base::RefCountedThreadSafe<ChildProcessLauncher::Context> {
|
| +class ChildProcessLauncherImpl::Context
|
| + : public base::RefCountedThreadSafe<ChildProcessLauncherImpl::Context> {
|
| public:
|
| Context()
|
| : client_(NULL),
|
| @@ -126,7 +126,7 @@ class ChildProcessLauncher::Context
|
| BrowserThread::PostTask(
|
| client_thread_id, FROM_HERE,
|
| base::Bind(
|
| - &ChildProcessLauncher::Context::Notify,
|
| + &ChildProcessLauncherImpl::Context::Notify,
|
| this_object,
|
| handle));
|
| }
|
| @@ -145,8 +145,8 @@ class ChildProcessLauncher::Context
|
| }
|
|
|
| private:
|
| - friend class base::RefCountedThreadSafe<ChildProcessLauncher::Context>;
|
| - friend class ChildProcessLauncher;
|
| + friend class base::RefCountedThreadSafe<ChildProcessLauncherImpl::Context>;
|
| + friend class ChildProcessLauncherImpl;
|
|
|
| ~Context() {
|
| Terminate();
|
| @@ -159,7 +159,7 @@ class ChildProcessLauncher::Context
|
| } else {
|
| BrowserThread::PostTask(
|
| BrowserThread::PROCESS_LAUNCHER, FROM_HERE,
|
| - base::Bind(&ChildProcessLauncher::Context::RecordLaunchHistograms,
|
| + base::Bind(&ChildProcessLauncherImpl::Context::RecordLaunchHistograms,
|
| launch_time));
|
| }
|
| }
|
| @@ -194,6 +194,7 @@ class ChildProcessLauncher::Context
|
| scoped_ptr<CommandLine> cmd_line_deleter(cmd_line);
|
| base::TimeTicks begin_launch_time = base::TimeTicks::Now();
|
|
|
| +
|
| #if defined(OS_WIN)
|
| scoped_ptr<SandboxedProcessLauncherDelegate> delegate_deleter(delegate);
|
| base::ProcessHandle handle = StartSandboxedProcess(delegate, cmd_line);
|
| @@ -214,7 +215,7 @@ class ChildProcessLauncher::Context
|
| &files_to_register);
|
|
|
| StartChildProcess(cmd_line->argv(), files_to_register,
|
| - base::Bind(&ChildProcessLauncher::Context::OnChildProcessStarted,
|
| + base::Bind(&ChildProcessLauncherImpl::Context::OnChildProcessStarted,
|
| this_object, client_thread_id, begin_launch_time));
|
|
|
| #elif defined(OS_POSIX)
|
| @@ -410,7 +411,7 @@ class ChildProcessLauncher::Context
|
| };
|
|
|
|
|
| -ChildProcessLauncher::ChildProcessLauncher(
|
| +ChildProcessLauncherImpl::ChildProcessLauncherImpl(
|
| #if defined(OS_WIN)
|
| SandboxedProcessLauncherDelegate* delegate,
|
| #elif defined(OS_POSIX)
|
| @@ -437,20 +438,20 @@ ChildProcessLauncher::ChildProcessLauncher(
|
| client);
|
| }
|
|
|
| -ChildProcessLauncher::~ChildProcessLauncher() {
|
| +ChildProcessLauncherImpl::~ChildProcessLauncherImpl() {
|
| context_->ResetClient();
|
| }
|
|
|
| -bool ChildProcessLauncher::IsStarting() {
|
| +bool ChildProcessLauncherImpl::IsStarting() {
|
| return context_->starting_;
|
| }
|
|
|
| -base::ProcessHandle ChildProcessLauncher::GetHandle() {
|
| +base::ProcessHandle ChildProcessLauncherImpl::GetHandle() {
|
| DCHECK(!context_->starting_);
|
| return context_->process_.handle();
|
| }
|
|
|
| -base::TerminationStatus ChildProcessLauncher::GetChildTerminationStatus(
|
| +base::TerminationStatus ChildProcessLauncherImpl::GetChildTerminationStatus(
|
| bool known_dead,
|
| int* exit_code) {
|
| base::ProcessHandle handle = context_->process_.handle();
|
| @@ -491,15 +492,15 @@ base::TerminationStatus ChildProcessLauncher::GetChildTerminationStatus(
|
| return context_->termination_status_;
|
| }
|
|
|
| -void ChildProcessLauncher::SetProcessBackgrounded(bool background) {
|
| +void ChildProcessLauncherImpl::SetProcessBackgrounded(bool background) {
|
| BrowserThread::PostTask(
|
| BrowserThread::PROCESS_LAUNCHER, FROM_HERE,
|
| base::Bind(
|
| - &ChildProcessLauncher::Context::SetProcessBackgrounded,
|
| + &ChildProcessLauncherImpl::Context::SetProcessBackgrounded,
|
| GetHandle(), background));
|
| }
|
|
|
| -void ChildProcessLauncher::SetTerminateChildOnShutdown(
|
| +void ChildProcessLauncherImpl::SetTerminateChildOnShutdown(
|
| bool terminate_on_shutdown) {
|
| if (context_.get())
|
| context_->set_terminate_child_on_shutdown(terminate_on_shutdown);
|
|
|