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

Unified Diff: sync/internal_api/http_bridge_unittest.cc

Issue 2083713002: Remove calls to MessageLoop::current() in sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self-review Created 4 years, 6 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/http_bridge.cc ('k') | sync/internal_api/public/engine/model_safe_worker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/http_bridge_unittest.cc
diff --git a/sync/internal_api/http_bridge_unittest.cc b/sync/internal_api/http_bridge_unittest.cc
index 78870a3d22aaee38e98ccb8cc67a85acea43f9e2..74337fccd0b07f989f6af57eb770b72b9beadd6b 100644
--- a/sync/internal_api/http_bridge_unittest.cc
+++ b/sync/internal_api/http_bridge_unittest.cc
@@ -6,6 +6,7 @@
#include <stdint.h>
#include "base/bit_cast.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/stringprintf.h"
#include "base/synchronization/waitable_event.h"
#include "base/threading/thread.h"
@@ -142,7 +143,8 @@ class ShuntedHttpBridge : public HttpBridge {
protected:
void MakeAsynchronousPost() override {
- ASSERT_TRUE(base::MessageLoop::current() == test_->GetIOThreadLoop());
+ ASSERT_TRUE(
+ test_->GetIOThreadLoop()->task_runner()->BelongsToCurrentThread());
if (never_finishes_)
return;
@@ -156,7 +158,8 @@ class ShuntedHttpBridge : public HttpBridge {
~ShuntedHttpBridge() override {}
void CallOnURLFetchComplete() {
- ASSERT_TRUE(base::MessageLoop::current() == test_->GetIOThreadLoop());
+ ASSERT_TRUE(
+ test_->GetIOThreadLoop()->task_runner()->BelongsToCurrentThread());
// We return a dummy content response.
std::string response_content = "success!";
net::TestURLFetcher fetcher(0, GURL("http://www.google.com"), NULL);
« no previous file with comments | « sync/internal_api/http_bridge.cc ('k') | sync/internal_api/public/engine/model_safe_worker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698