| Index: chrome/browser/chrome_browser_main.cc
|
| diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
|
| index 81bbef48cfb27be9817da82d8f10dc33bc4d4d4c..0e7cc3cdb5140337c0b1a9ffb672dea4d4b85dd3 100644
|
| --- a/chrome/browser/chrome_browser_main.cc
|
| +++ b/chrome/browser/chrome_browser_main.cc
|
| @@ -855,8 +855,8 @@ void ChromeBrowserMainParts::PostMainMessageLoopStart() {
|
| chrome_extra_parts_[i]->PostMainMessageLoopStart();
|
| }
|
|
|
| -int ChromeBrowserMainParts::PreCreateThreads() {
|
| - TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreCreateThreads");
|
| +int ChromeBrowserMainParts::PreCreateThreadsBegin() {
|
| + TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreCreateThreadsBegin");
|
| result_code_ = PreCreateThreadsImpl();
|
|
|
| if (result_code_ == content::RESULT_CODE_NORMAL_EXIT) {
|
| @@ -866,7 +866,7 @@ int ChromeBrowserMainParts::PreCreateThreads() {
|
| DCHECK(browser_creator_.get());
|
| #endif // !defined(OS_ANDROID)
|
| for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
|
| - chrome_extra_parts_[i]->PreCreateThreads();
|
| + chrome_extra_parts_[i]->PreCreateThreadsBegin();
|
| }
|
|
|
| return result_code_;
|
| @@ -1112,6 +1112,21 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
|
| return content::RESULT_CODE_NORMAL_EXIT;
|
| }
|
|
|
| +void ChromeBrowserMainParts::PreCreateThreadsEnd() {
|
| + // It is important to call gl_string_manager()->Initialize() before starting
|
| + // the gpu process. Internally it properly setup the black listed features.
|
| + // Which it is used to decide whether to start or not the gpu process from
|
| + // BrowserMainLoop::BrowserThreadsStarted.
|
| +
|
| + // Retrieve cached GL strings from local state and use them for GPU
|
| + // blacklist decisions.
|
| + if (g_browser_process->gl_string_manager())
|
| + g_browser_process->gl_string_manager()->Initialize();
|
| +
|
| + // Create an instance of GpuModeManager to watch gpu mode pref change.
|
| + g_browser_process->gpu_mode_manager();
|
| +}
|
| +
|
| void ChromeBrowserMainParts::PreMainMessageLoopRun() {
|
| TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRun");
|
| TRACK_SCOPED_REGION(
|
| @@ -1469,14 +1484,6 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
| // (requires supporting early exit).
|
| PostProfileInit();
|
|
|
| - // Retrieve cached GL strings from local state and use them for GPU
|
| - // blacklist decisions.
|
| - if (g_browser_process->gl_string_manager())
|
| - g_browser_process->gl_string_manager()->Initialize();
|
| -
|
| - // Create an instance of GpuModeManager to watch gpu mode pref change.
|
| - g_browser_process->gpu_mode_manager();
|
| -
|
| #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
|
| // Show the First Run UI if this is the first time Chrome has been run on
|
| // this computer, or we're being compelled to do so by a command line flag.
|
|
|