Chromium Code Reviews| Index: content/browser/browser_main_loop.cc |
| diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc |
| index 5021cd5c45c38f59493fbb778338da8fff3082a0..924a2d254e530095a20d5468579e891a40cc34f4 100644 |
| --- a/content/browser/browser_main_loop.cc |
| +++ b/content/browser/browser_main_loop.cc |
| @@ -532,6 +532,8 @@ BrowserMainLoop::BrowserMainLoop(const MainFunctionParams& parameters) |
| tracing::TraceConfigFile::GetInstance()->GetStartupDuration() > 0)) { |
| DCHECK(!g_current_browser_main_loop); |
| g_current_browser_main_loop = this; |
| + |
| + base::TaskScheduler::Create(""); |
|
robliao
2017/04/24 18:15:54
Should we be more aggressive about the creation po
gab
2017/04/25 15:29:15
Agreed for ASAP but this is essentially the same l
robliao
2017/04/25 17:21:30
I think this change is fine for now, but given tha
|
| } |
|
robliao
2017/04/25 17:21:30
Document the use of "".
|
| BrowserMainLoop::~BrowserMainLoop() { |
| @@ -952,14 +954,15 @@ void BrowserMainLoop::CreateStartupTasks() { |
| int BrowserMainLoop::CreateThreads() { |
| TRACE_EVENT0("startup,rail", "BrowserMainLoop::CreateThreads"); |
| - auto task_scheduler_init_params = |
| - GetContentClient()->browser()->GetTaskSchedulerInitParams(); |
| - if (!task_scheduler_init_params) |
| - task_scheduler_init_params = GetDefaultTaskSchedulerInitParams(); |
| - DCHECK(task_scheduler_init_params); |
| - |
| - base::TaskScheduler::CreateAndSetDefaultTaskScheduler( |
| - "", *task_scheduler_init_params.get()); |
| + { |
| + auto task_scheduler_init_params = |
| + GetContentClient()->browser()->GetTaskSchedulerInitParams(); |
| + if (!task_scheduler_init_params) |
| + task_scheduler_init_params = GetDefaultTaskSchedulerInitParams(); |
| + DCHECK(task_scheduler_init_params); |
| + base::TaskScheduler::GetInstance()->Start( |
| + *task_scheduler_init_params.get()); |
| + } |
| GetContentClient()->browser()->PerformExperimentalTaskSchedulerRedirections(); |