| Index: content/browser/renderer_host/render_process_host_impl.h
|
| diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h
|
| index 5f528b1c491377884b78673a405e88c1fea24d69..6b8885c33c090cbaeb2da2b46806f816e672adb6 100644
|
| --- a/content/browser/renderer_host/render_process_host_impl.h
|
| +++ b/content/browser/renderer_host/render_process_host_impl.h
|
| @@ -184,6 +184,21 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
|
|
| static base::MessageLoop* GetInProcessRendererThreadForTesting();
|
|
|
| + void SetChildProcessLauncherFactory(
|
| + const base::Callback<scoped_ptr<ChildProcessLauncher>(
|
| +#if defined(OS_WIN)
|
| + SandboxedProcessLauncherDelegate* delegate,
|
| +#elif defined(OS_POSIX)
|
| + bool use_zygote,
|
| + const base::EnvironmentVector& environ,
|
| + int ipcfd,
|
| +#endif
|
| + CommandLine* cmd_line,
|
| + int child_process_id,
|
| + ChildProcessLauncher::Client* client)>& factory) {
|
| + child_process_launcher_factory_ = factory;
|
| + }
|
| +
|
| protected:
|
| // A proxy for our IPC::Channel that lives on the IO thread (see
|
| // browser_process.h)
|
| @@ -278,6 +293,21 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
| // also reset that in the case of process termination.
|
| bool is_initialized_;
|
|
|
| + // Used to mock out child_process_launcher_ in tests. See
|
| + // NewChildProcessLauncher() for the interface.
|
| + base::Callback<scoped_ptr<ChildProcessLauncher>(
|
| +#if defined(OS_WIN)
|
| + SandboxedProcessLauncherDelegate* delegate,
|
| +#elif defined(OS_POSIX)
|
| + bool use_zygote,
|
| + const base::EnvironmentVector& environ,
|
| + int ipcfd,
|
| +#endif
|
| + CommandLine* cmd_line,
|
| + int child_process_id,
|
| + ChildProcessLauncher::Client* client)>
|
| + child_process_launcher_factory_;
|
| +
|
| // Used to launch and terminate the process without blocking the UI thread.
|
| scoped_ptr<ChildProcessLauncher> child_process_launcher_;
|
|
|
|
|