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

Unified Diff: chrome/browser/sync/glue/http_bridge.h

Issue 306032: Simplify threading in browser thread by making only ChromeThread deal with di... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: a few more simplifications Created 11 years, 2 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: chrome/browser/sync/glue/http_bridge.h
===================================================================
--- chrome/browser/sync/glue/http_bridge.h (revision 30037)
+++ chrome/browser/sync/glue/http_bridge.h (working copy)
@@ -97,7 +97,7 @@
DISALLOW_COPY_AND_ASSIGN(RequestContextGetter);
};
- HttpBridge(RequestContextGetter* context, MessageLoop* io_loop);
+ HttpBridge(RequestContextGetter* context);
virtual ~HttpBridge();
// sync_api::HttpPostProvider implementation.
@@ -135,7 +135,7 @@
private:
friend class ::HttpBridgeTest;
- // Called on the io_loop_ to issue the network request. The extra level
+ // Called on the IO loop to issue the network request. The extra level
// of indirection is so that the unit test can override this behavior but we
// still have a function to statically pass to PostTask.
void CallMakeAsynchronousPost() { MakeAsynchronousPost(); }
@@ -148,7 +148,7 @@
// so we can block created_on_loop_ while the fetch is in progress.
// NOTE: This is not a scoped_ptr for a reason. It must be deleted on the same
// thread that created it, which isn't the same thread |this| gets deleted on.
- // We must manually delete url_poster_ on the io_loop_.
+ // We must manually delete url_poster_ on the IO loop.
URLFetcher* url_poster_;
// The message loop of the thread we were created on. This is the thread that
@@ -158,10 +158,6 @@
// on network IO through curl_easy_perform.
MessageLoop* const created_on_loop_;
- // Member variable for the IO loop instead of asking ChromeThread directly,
- // done this way for testability.
- MessageLoop* const io_loop_;
-
// The URL to POST to.
GURL url_for_request_;
@@ -178,15 +174,10 @@
std::string response_content_;
// A waitable event we use to provide blocking semantics to
- // MakeSynchronousPost. We block created_on_loop_ while the io_loop_ fetches
+ // MakeSynchronousPost. We block created_on_loop_ while the IO loop fetches
// network request.
base::WaitableEvent http_post_completed_;
- // This is here so that the unit test subclass can force our URLFetcher to
- // use the io_loop_ passed on construction for network requests, rather than
- // ChromeThread::IO's message loop (which won't exist in testing).
- bool use_io_loop_for_testing_;
-
DISALLOW_COPY_AND_ASSIGN(HttpBridge);
};

Powered by Google App Engine
This is Rietveld 408576698