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

Unified Diff: sync/internal_api/public/util/weak_handle.cc

Issue 1110063004: [sync] Replace MessageLoopProxy usage with ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed suggestion Created 5 years, 8 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 | « sync/internal_api/public/util/weak_handle.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/public/util/weak_handle.cc
diff --git a/sync/internal_api/public/util/weak_handle.cc b/sync/internal_api/public/util/weak_handle.cc
index 0ed142ee35b03be5b048bea74f228cc8e3eae58c..e0864edeb38181f61774cf662ee83f8a5b5447fe 100644
--- a/sync/internal_api/public/util/weak_handle.cc
+++ b/sync/internal_api/public/util/weak_handle.cc
@@ -8,17 +8,17 @@
#include "base/callback.h"
#include "base/location.h"
-#include "base/message_loop/message_loop_proxy.h"
+#include "base/thread_task_runner_handle.h"
namespace syncer {
namespace internal {
WeakHandleCoreBase::WeakHandleCoreBase()
- : owner_loop_proxy_(base::MessageLoopProxy::current()) {}
+ : owner_loop_task_runner_(base::ThreadTaskRunnerHandle::Get()) {}
bool WeakHandleCoreBase::IsOnOwnerThread() const {
- return owner_loop_proxy_->BelongsToCurrentThread();
+ return owner_loop_task_runner_->BelongsToCurrentThread();
}
WeakHandleCoreBase::~WeakHandleCoreBase() {}
@@ -26,7 +26,7 @@ WeakHandleCoreBase::~WeakHandleCoreBase() {}
void WeakHandleCoreBase::PostToOwnerThread(
const tracked_objects::Location& from_here,
const base::Closure& fn) const {
- if (!owner_loop_proxy_->PostTask(from_here, fn)) {
+ if (!owner_loop_task_runner_->PostTask(from_here, fn)) {
DVLOG(1) << "Could not post task from " << from_here.ToString();
}
}
« no previous file with comments | « sync/internal_api/public/util/weak_handle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698