Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(528)

Unified Diff: sync/engine/sync_scheduler_impl.cc

Issue 2033933002: Remove use of deprecated MessageLoop methods in sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sync/engine/sync_scheduler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..668b503475c7aa4476d36e4ca32ed5554221c215 100644
--- a/sync/engine/sync_scheduler_impl.cc
+++ b/sync/engine/sync_scheduler_impl.cc
@@ -14,6 +14,8 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
maxbogue 2016/06/06 16:52:17 Has it been considered to just include this header
+#include "base/threading/thread_task_runner_handle.h"
#include "sync/engine/backoff_delay_provider.h"
#include "sync/engine/syncer.h"
#include "sync/protocol/proto_enum_conversions.h"
@@ -746,9 +748,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() {
« no previous file with comments | « no previous file | sync/engine/sync_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698