| Index: content/app/content_main_runner.cc
|
| diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
|
| index da27afaaf017aa36d9ca79c77b98cbf032ac72f3..4ed818fc4fb743bb454cc95f2e3262684d498e9e 100644
|
| --- a/content/app/content_main_runner.cc
|
| +++ b/content/app/content_main_runner.cc
|
| @@ -406,6 +406,27 @@ int RunZygote(const MainFunctionParams& main_function_params,
|
| #endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
|
|
|
| #if !defined(OS_IOS)
|
| +static void RegisterMainThreadFactories() {
|
| +#if !defined(CHROME_MULTIPLE_DLL_BROWSER)
|
| + UtilityProcessHost::RegisterUtilityMainThreadFactory(
|
| + CreateInProcessUtilityThread);
|
| + RenderProcessHost::RegisterRendererMainThreadFactory(
|
| + CreateInProcessRendererThread);
|
| + GpuProcessHost::RegisterGpuMainThreadFactory(
|
| + CreateInProcessGpuThread);
|
| +#else
|
| + CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
| + if (command_line.HasSwitch(switches::kSingleProcess)) {
|
| + LOG(FATAL) <<
|
| + "--single-process is not supported in chrome multiple dll browser.";
|
| + }
|
| + if (command_line.HasSwitch(switches::kInProcessGPU)) {
|
| + LOG(FATAL) <<
|
| + "--in-process-gpu is not supported in chrome multiple dll browser.";
|
| + }
|
| +#endif
|
| +}
|
| +
|
| // Run the FooMain() for a given process type.
|
| // If |process_type| is empty, runs BrowserMain().
|
| // Returns the exit code for this process.
|
| @@ -430,14 +451,7 @@ int RunNamedProcessTypeMain(
|
| #endif // !CHROME_MULTIPLE_DLL_BROWSER
|
| };
|
|
|
| -#if !defined(CHROME_MULTIPLE_DLL_BROWSER)
|
| - UtilityProcessHost::RegisterUtilityMainThreadFactory(
|
| - CreateInProcessUtilityThread);
|
| - RenderProcessHost::RegisterRendererMainThreadFactory(
|
| - CreateInProcessRendererThread);
|
| - GpuProcessHost::RegisterGpuMainThreadFactory(
|
| - CreateInProcessGpuThread);
|
| -#endif
|
| + RegisterMainThreadFactories();
|
|
|
| for (size_t i = 0; i < arraysize(kMainFunctions); ++i) {
|
| if (process_type == kMainFunctions[i].name) {
|
|
|