Chromium Code Reviews| Index: sync/engine/sync_scheduler_impl.cc |
| diff --git a/sync/engine/sync_scheduler_impl.cc b/sync/engine/sync_scheduler_impl.cc |
| index e6b5a764875a38454370097925f1dcab1af9e312..a0594ca4c8416387891ad040c924453be95ca258 100644 |
| --- a/sync/engine/sync_scheduler_impl.cc |
| +++ b/sync/engine/sync_scheduler_impl.cc |
| @@ -13,7 +13,7 @@ |
| #include "base/compiler_specific.h" |
| #include "base/location.h" |
| #include "base/logging.h" |
| -#include "base/message_loop/message_loop.h" |
| +#include "base/thread_task_runner_handle.h" |
|
gab
2016/05/12 15:50:57
FYI, that header moved to base/threading/thread_ta
|
| #include "sync/engine/backoff_delay_provider.h" |
| #include "sync/engine/syncer.h" |
| #include "sync/protocol/proto_enum_conversions.h" |
| @@ -226,7 +226,8 @@ void SyncSchedulerImpl::OnServerConnectionErrorFixed() { |
| void SyncSchedulerImpl::Start(Mode mode, base::Time last_poll_time) { |
| DCHECK(CalledOnValidThread()); |
| - std::string thread_name = base::MessageLoop::current()->thread_name(); |
| + std::string thread_name = |
| + base::ThreadTaskRunnerHandle::Get()->GetThreadName(); |
| if (thread_name.empty()) |
| thread_name = "<Main thread>"; |
| SDVLOG(2) << "Start called from thread " |
| @@ -746,9 +747,9 @@ void SyncSchedulerImpl::TryCanaryJob() { |
| void SyncSchedulerImpl::TrySyncSessionJob() { |
| // Post call to TrySyncSessionJobImpl on current thread. Later request for |
| // access token will be here. |
| - base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind( |
| - &SyncSchedulerImpl::TrySyncSessionJobImpl, |
| - weak_ptr_factory_.GetWeakPtr())); |
| + base::ThreadTaskRunnerHandle::Get()->PostTask( |
| + FROM_HERE, base::Bind(&SyncSchedulerImpl::TrySyncSessionJobImpl, |
| + weak_ptr_factory_.GetWeakPtr())); |
| } |
| void SyncSchedulerImpl::TrySyncSessionJobImpl() { |