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

Unified Diff: content/public/test/mock_resource_context.cc

Issue 17127002: Correctly integrate StoragePartition into TestingProfile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix InstantNTP test. Created 7 years, 5 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 | « content/public/test/mock_resource_context.h ('k') | content/public/test/test_browser_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/mock_resource_context.cc
diff --git a/content/public/test/mock_resource_context.cc b/content/public/test/mock_resource_context.cc
index 2758c2f5cd10caa354b182f7ecb3de3c5f806df2..adbb6b57a39a0aa3b885184a59487be48f5fdf53 100644
--- a/content/public/test/mock_resource_context.cc
+++ b/content/public/test/mock_resource_context.cc
@@ -5,12 +5,16 @@
#include "content/public/test/mock_resource_context.h"
#include "net/url_request/url_request_context.h"
-#include "net/url_request/url_request_test_util.h"
namespace content {
MockResourceContext::MockResourceContext()
- : test_request_context_(new net::TestURLRequestContext) {
+ : test_request_context_(NULL) {
+}
+
+MockResourceContext::MockResourceContext(
+ net::URLRequestContext* test_request_context)
+ : test_request_context_(test_request_context) {
}
MockResourceContext::~MockResourceContext() {}
@@ -20,7 +24,8 @@ net::HostResolver* MockResourceContext::GetHostResolver() {
}
net::URLRequestContext* MockResourceContext::GetRequestContext() {
- return test_request_context_.get();
+ CHECK(test_request_context_);
+ return test_request_context_;
}
} // namespace content
« no previous file with comments | « content/public/test/mock_resource_context.h ('k') | content/public/test/test_browser_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698