summaryrefslogtreecommitdiffstats
path: root/sync
diff options
context:
space:
mode:
Diffstat (limited to 'sync')
-rw-r--r--sync/internal_api/public/util/weak_handle.cc8
-rw-r--r--sync/internal_api/public/util/weak_handle.h7
2 files changed, 6 insertions, 9 deletions
diff --git a/sync/internal_api/public/util/weak_handle.cc b/sync/internal_api/public/util/weak_handle.cc
index 0ed142e..e0864ed 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();
}
}
diff --git a/sync/internal_api/public/util/weak_handle.h b/sync/internal_api/public/util/weak_handle.h
index c299be7..7a11a15 100644
--- a/sync/internal_api/public/util/weak_handle.h
+++ b/sync/internal_api/public/util/weak_handle.h
@@ -58,12 +58,9 @@
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
+#include "base/single_thread_task_runner.h"
#include "sync/base/sync_export.h"
-namespace base {
-class MessageLoopProxy;
-} // namespace base
-
namespace tracked_objects {
class Location;
} // namespace tracked_objects
@@ -118,7 +115,7 @@ class SYNC_EXPORT WeakHandleCoreBase {
private:
// May be used on any thread.
- const scoped_refptr<base::MessageLoopProxy> owner_loop_proxy_;
+ const scoped_refptr<base::SingleThreadTaskRunner> owner_loop_task_runner_;
DISALLOW_COPY_AND_ASSIGN(WeakHandleCoreBase);
};