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

Unified Diff: sync/api/attachments/attachment_service_proxy.cc

Issue 375403002: Replace MessageLoopProxy with ThreadTaskRunnerHandle in src/sync/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
Index: sync/api/attachments/attachment_service_proxy.cc
diff --git a/sync/api/attachments/attachment_service_proxy.cc b/sync/api/attachments/attachment_service_proxy.cc
index 2477140d1cf5dfb0a06a810b016548dd1a4649ba..4b9bc6786a4b89dd9d37c8940e0df0a049b3254a 100644
--- a/sync/api/attachments/attachment_service_proxy.cc
+++ b/sync/api/attachments/attachment_service_proxy.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
+#include "base/thread_task_runner_handle.h"
#include "sync/api/sync_data.h"
namespace syncer {
@@ -71,8 +72,10 @@ void AttachmentServiceProxy::GetOrDownloadAttachments(
const AttachmentIdList& attachment_ids,
const GetOrDownloadCallback& callback) {
DCHECK(wrapped_task_runner_);
- GetOrDownloadCallback proxy_callback = base::Bind(
- &ProxyGetOrDownloadCallback, base::MessageLoopProxy::current(), callback);
+ GetOrDownloadCallback proxy_callback =
+ base::Bind(&ProxyGetOrDownloadCallback,
+ base::ThreadTaskRunnerHandle::Get(),
+ callback);
wrapped_task_runner_->PostTask(
FROM_HERE,
base::Bind(&AttachmentService::GetOrDownloadAttachments,
@@ -86,7 +89,7 @@ void AttachmentServiceProxy::DropAttachments(
const DropCallback& callback) {
DCHECK(wrapped_task_runner_);
DropCallback proxy_callback = base::Bind(
- &ProxyDropCallback, base::MessageLoopProxy::current(), callback);
+ &ProxyDropCallback, base::ThreadTaskRunnerHandle::Get(), callback);
wrapped_task_runner_->PostTask(FROM_HERE,
base::Bind(&AttachmentService::DropAttachments,
core_,
@@ -98,7 +101,7 @@ void AttachmentServiceProxy::StoreAttachments(const AttachmentList& attachments,
const StoreCallback& callback) {
DCHECK(wrapped_task_runner_);
StoreCallback proxy_callback = base::Bind(
- &ProxyStoreCallback, base::MessageLoopProxy::current(), callback);
+ &ProxyStoreCallback, base::ThreadTaskRunnerHandle::Get(), callback);
wrapped_task_runner_->PostTask(
FROM_HERE,
base::Bind(&AttachmentService::StoreAttachments,

Powered by Google App Engine
This is Rietveld 408576698