| Index: content/browser/browser_main_loop.cc
|
| diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
|
| index 732f0e257348f4ac8621dd4bfe2c5b75c3bb59f5..2d8b9180acec7cd84031d71788d1ebee593d28db 100644
|
| --- a/content/browser/browser_main_loop.cc
|
| +++ b/content/browser/browser_main_loop.cc
|
| @@ -704,7 +704,7 @@ int BrowserMainLoop::PreCreateThreads() {
|
| "BrowserMainLoop::CreateThreads:PreCreateThreads");
|
| TRACK_SCOPED_REGION("Startup", "BrowserMainLoop::PreCreateThreads");
|
|
|
| - result_code_ = parts_->PreCreateThreads();
|
| + result_code_ = parts_->PreCreateThreadsBegin();
|
| }
|
|
|
| // Initialize an instance of FeatureList. This will be a no-op if an instance
|
| @@ -746,7 +746,7 @@ int BrowserMainLoop::PreCreateThreads() {
|
| // 1) Need to initialize in-process GpuDataManager before creating threads.
|
| // It's unsafe to append the gpu command line switches to the global
|
| // CommandLine::ForCurrentProcess object after threads are created.
|
| - // 2) Must be after parts_->PreCreateThreads to pick up chrome://flags.
|
| + // 2) Must be after parts_->PreCreateThreadsBegin to pick up chrome://flags.
|
| GpuDataManagerImpl::GetInstance()->Initialize();
|
|
|
| #if !defined(OS_IOS) && (!defined(GOOGLE_CHROME_BUILD) || defined(OS_ANDROID))
|
| @@ -756,6 +756,11 @@ int BrowserMainLoop::PreCreateThreads() {
|
| RenderProcessHost::SetRunRendererInProcess(true);
|
| #endif
|
|
|
| + // parts may want to do some processing just before actually starting the
|
| + // threads.
|
| + if (parts_)
|
| + parts_->PreCreateThreadsEnd();
|
| +
|
| return result_code_;
|
| }
|
|
|
| @@ -1203,11 +1208,13 @@ int BrowserMainLoop::BrowserThreadsStarted() {
|
| BrowserGpuChannelHostFactory::Initialize(established_gpu_channel);
|
| #elif defined(USE_AURA) || defined(OS_MACOSX)
|
| established_gpu_channel = true;
|
| + DVLOG(1) << "check and maybe start gpu process";
|
| if (!GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor() ||
|
| parsed_command_line_.HasSwitch(switches::kDisableGpuEarlyInit)) {
|
| established_gpu_channel = always_uses_gpu = false;
|
| }
|
| BrowserGpuChannelHostFactory::Initialize(established_gpu_channel);
|
| + DVLOG(1) << "/check and maybe start gpu process";
|
| ImageTransportFactory::Initialize();
|
| #if defined(USE_AURA)
|
| bool use_mus_in_renderer = false;
|
|
|