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 be0338ab34e6f7ff7ab76e78d4967ce39d495ffe..3b079018a0f35476ec3bb60b9c2e86bd07902ec7 100644 |
| --- a/content/browser/browser_main_loop.cc |
| +++ b/content/browser/browser_main_loop.cc |
| @@ -6,9 +6,9 @@ |
| #include "base/bind.h" |
| #include "base/command_line.h" |
| +#include "base/location.h" |
| #include "base/logging.h" |
| #include "base/memory/memory_pressure_monitor.h" |
| -#include "base/message_loop/message_loop.h" |
| #include "base/metrics/field_trial.h" |
| #include "base/metrics/histogram.h" |
| #include "base/pending_task.h" |
| @@ -17,6 +17,7 @@ |
| #include "base/process/process_metrics.h" |
| #include "base/profiler/scoped_profile.h" |
| #include "base/run_loop.h" |
| +#include "base/single_thread_task_runner.h" |
| #include "base/strings/string_number_conversions.h" |
| #include "base/strings/string_split.h" |
| #include "base/system_monitor/system_monitor.h" |
| @@ -620,7 +621,7 @@ void BrowserMainLoop::PostMainMessageLoopStart() { |
| #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) |
| trace_memory_controller_.reset(new base::trace_event::TraceMemoryController( |
| - base::MessageLoop::current()->message_loop_proxy(), |
| + base::MessageLoop::current()->task_runner(), |
| ::HeapProfilerWithPseudoStackStart, ::HeapProfilerStop, |
| ::GetHeapProfile)); |
| #endif |
| @@ -705,13 +706,13 @@ void BrowserMainLoop::CreateStartupTasks() { |
| // First time through, we really want to create all the tasks |
| if (!startup_task_runner_.get()) { |
| #if defined(OS_ANDROID) |
| - startup_task_runner_ = make_scoped_ptr(new StartupTaskRunner( |
| - base::Bind(&BrowserStartupComplete), |
| - base::MessageLoop::current()->message_loop_proxy())); |
| + startup_task_runner_ = make_scoped_ptr( |
| + new StartupTaskRunner(base::Bind(&BrowserStartupComplete), |
| + base::ThreadTaskRunnerHandle::Get())); |
| #else |
| - startup_task_runner_ = make_scoped_ptr(new StartupTaskRunner( |
| - base::Callback<void(int)>(), |
| - base::MessageLoop::current()->message_loop_proxy())); |
| + startup_task_runner_ = make_scoped_ptr( |
| + new StartupTaskRunner(base::Callback<void(int)>(), |
| + base::MessageLoop::current()->task_runner())); |
|
no sievers
2015/06/01 23:30:47
Should this also be base::ThreadTaskRunnerHandle::
Sami
2015/06/03 14:55:21
Thanks, fixed.
|
| #endif |
| StartupTask pre_create_threads = |
| base::Bind(&BrowserMainLoop::PreCreateThreads, base::Unretained(this)); |
| @@ -1196,7 +1197,7 @@ int BrowserMainLoop::BrowserThreadsStarted() { |
| "startup", |
| "BrowserMainLoop::BrowserThreadsStarted::InitUserInputMonitor"); |
| user_input_monitor_ = media::UserInputMonitor::Create( |
| - io_thread_->message_loop_proxy(), main_thread_->message_loop_proxy()); |
| + io_thread_->task_runner(), main_thread_->task_runner()); |
| } |
| { |
| @@ -1298,8 +1299,8 @@ void BrowserMainLoop::MainMessageLoopRun() { |
| #else |
| DCHECK(base::MessageLoopForUI::IsCurrent()); |
| if (parameters_.ui_task) { |
| - base::MessageLoopForUI::current()->PostTask(FROM_HERE, |
| - *parameters_.ui_task); |
| + base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, |
| + *parameters_.ui_task); |
| } |
| base::RunLoop run_loop; |