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

Unified Diff: chrome/test/testing_profile.cc

Issue 1702016: Changed UrlFetcher to use a MessageLoopProxy instead of directly relying on C... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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 | « chrome/browser/sync/glue/http_bridge_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/testing_profile.cc
===================================================================
--- chrome/test/testing_profile.cc (revision 46098)
+++ chrome/test/testing_profile.cc (working copy)
@@ -6,6 +6,7 @@
#include "build/build_config.h"
#include "base/command_line.h"
+#include "base/message_loop_proxy.h"
#include "base/string_util.h"
#include "chrome/common/url_constants.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
@@ -99,7 +100,7 @@
// The one here can be run on the main test thread. Note that this can lead to
// a leak if your test does not have a ChromeThread::IO in it because
// URLRequestContextGetter is defined as a ReferenceCounted object with a
-// DeleteOnIOThread trait.
+// special trait that deletes it on the IO thread.
class TestURLRequestContextGetter : public URLRequestContextGetter {
public:
virtual URLRequestContext* GetURLRequestContext() {
@@ -107,6 +108,9 @@
context_ = new TestURLRequestContext();
return context_.get();
}
+ virtual scoped_refptr<MessageLoopProxy> GetIOMessageLoopProxy() {
+ return ChromeThread::GetMessageLoopProxyForThread(ChromeThread::IO);
+ }
private:
scoped_refptr<URLRequestContext> context_;
@@ -129,6 +133,9 @@
context_ = new TestExtensionURLRequestContext();
return context_.get();
}
+ virtual scoped_refptr<MessageLoopProxy> GetIOMessageLoopProxy() {
+ return ChromeThread::GetMessageLoopProxyForThread(ChromeThread::IO);
+ }
private:
scoped_refptr<URLRequestContext> context_;
« no previous file with comments | « chrome/browser/sync/glue/http_bridge_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698