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

Unified Diff: net/url_request/url_request_test_util.cc

Issue 9562037: Move TestURLRequestContextGetter to url_request_test_util.{h,cc} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change comment Created 8 years, 10 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 | « net/url_request/url_request_test_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_test_util.cc
diff --git a/net/url_request/url_request_test_util.cc b/net/url_request/url_request_test_util.cc
index 2f3dd6e14c9e50527f475148b4bc23ea585ddf03..10bb2e54a6e8163c95228ebb1ccb56112531e79b 100644
--- a/net/url_request/url_request_test_util.cc
+++ b/net/url_request/url_request_test_util.cc
@@ -164,6 +164,25 @@ TestURLRequest::TestURLRequest(const GURL& url, Delegate* delegate)
TestURLRequest::~TestURLRequest() {}
+TestURLRequestContextGetter::TestURLRequestContextGetter(
+ const scoped_refptr<base::MessageLoopProxy>& io_message_loop_proxy)
+ : io_message_loop_proxy_(io_message_loop_proxy) {
+ DCHECK(io_message_loop_proxy.get());
+}
+
+TestURLRequestContextGetter::~TestURLRequestContextGetter() {}
+
+TestURLRequestContext* TestURLRequestContextGetter::GetURLRequestContext() {
+ if (!context_)
+ context_ = new TestURLRequestContext();
+ return context_.get();
+}
+
+scoped_refptr<base::MessageLoopProxy>
+TestURLRequestContextGetter::GetIOMessageLoopProxy() const {
+ return io_message_loop_proxy_;
+}
+
TestDelegate::TestDelegate()
: cancel_in_rr_(false),
cancel_in_rs_(false),
« no previous file with comments | « net/url_request/url_request_test_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698