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

Unified Diff: sync/internal_api/public/http_bridge.h

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/public/engine/model_safe_worker.cc ('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/http_bridge.h
diff --git a/sync/internal_api/public/http_bridge.h b/sync/internal_api/public/http_bridge.h
index 20d8bc638cff6e1bd25a4b4a4adacf5b35baacfd..cd6106c99d82c7aaa82c984a8ebce4b5e4c5d81a 100644
--- a/sync/internal_api/public/http_bridge.h
+++ b/sync/internal_api/public/http_bridge.h
@@ -15,6 +15,7 @@
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
#include "base/synchronization/waitable_event.h"
+#include "base/threading/thread_checker.h"
#include "base/timer/timer.h"
#include "net/url_request/url_fetcher_delegate.h"
#include "net/url_request/url_request_context.h"
@@ -28,10 +29,6 @@
class HttpBridgeTest;
-namespace base {
-class MessageLoop;
-}
-
namespace net {
class HttpResponseHeaders;
class HttpUserAgentSettings;
@@ -115,12 +112,12 @@ class SYNC_EXPORT HttpBridge : public base::RefCountedThreadSafe<HttpBridge>,
// Helper method to abort the request if we timed out.
void OnURLFetchTimedOut();
- // The message loop of the thread we were created on. This is the thread that
- // will block on MakeSynchronousPost while the IO thread fetches data from
- // the network.
+ // Used to check whether a method runs on the thread that we were created on.
+ // This is the thread that will block on MakeSynchronousPost while the IO
+ // thread fetches data from the network.
// This should be the main syncer thread (SyncerThread) which is what blocks
// on network IO through curl_easy_perform.
- base::MessageLoop* const created_on_loop_;
+ base::ThreadChecker thread_checker_;
// The user agent for all requests.
const std::string user_agent_;
« no previous file with comments | « sync/internal_api/public/engine/model_safe_worker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698