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

Unified Diff: sync/internal_api/attachments/attachment_service_proxy_unittest.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
Index: sync/internal_api/attachments/attachment_service_proxy_unittest.cc
diff --git a/sync/internal_api/attachments/attachment_service_proxy_unittest.cc b/sync/internal_api/attachments/attachment_service_proxy_unittest.cc
index eb7b852265fe3b07cc0ece1188cfbc3df6af8864..690223146ece8ecac3930f6a050cc2fc2f9b324e 100644
--- a/sync/internal_api/attachments/attachment_service_proxy_unittest.cc
+++ b/sync/internal_api/attachments/attachment_service_proxy_unittest.cc
@@ -7,12 +7,15 @@
#include <memory>
#include "base/bind.h"
+#include "base/location.h"
#include "base/memory/ref_counted_memory.h"
#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/synchronization/lock.h"
#include "base/synchronization/waitable_event.h"
#include "base/threading/non_thread_safe.h"
#include "base/threading/thread.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "sync/api/attachments/attachment.h"
#include "sync/internal_api/public/attachments/attachment_service.h"
#include "sync/internal_api/public/base/model_type.h"
@@ -40,10 +43,9 @@ class StubAttachmentService : public AttachmentService,
CalledOnValidThread();
Increment();
std::unique_ptr<AttachmentMap> attachments(new AttachmentMap());
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
- base::Bind(callback,
- AttachmentService::GET_UNSPECIFIED_ERROR,
+ base::Bind(callback, AttachmentService::GET_UNSPECIFIED_ERROR,
base::Passed(&attachments)));
}

Powered by Google App Engine
This is Rietveld 408576698