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

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

Issue 11308362: Add StoragePartition's ProtocolHandlers at URLRequestContext construction time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove incorrect comment Created 8 years 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: content/public/test/test_browser_context.cc
diff --git a/content/public/test/test_browser_context.cc b/content/public/test/test_browser_context.cc
index 2269812aeb678d6709108cd923bba29ec48f8eb7..81edc6e2c6d897bccd2cbbc4a580a9d68546b014 100644
--- a/content/public/test/test_browser_context.cc
+++ b/content/public/test/test_browser_context.cc
@@ -97,11 +97,22 @@ DownloadManagerDelegate* TestBrowserContext::GetDownloadManagerDelegate() {
}
net::URLRequestContextGetter* TestBrowserContext::GetRequestContext() {
- if (!request_context_.get()) {
- request_context_ = new TestContextURLRequestContextGetter(
- GetResourceContext()->GetRequestContext());
- }
+ CHECK(request_context_.get());
+ return request_context_.get();
+}
+
+net::URLRequestContextGetter* TestBrowserContext::CreateRequestContext(
+ scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
+ blob_protocol_handler,
+ scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
+ file_system_protocol_handler,
+ scoped_ptr<net::URLRequestJobFactory::Interceptor>
+ developer_protocol_handler) {
+ DCHECK(!request_context_);
+ request_context_ = new TestContextURLRequestContextGetter(
+ GetResourceContext()->GetRequestContext());
return request_context_.get();
+
}
net::URLRequestContextGetter*
@@ -111,9 +122,15 @@ TestBrowserContext::GetRequestContextForRenderProcess(int renderer_child_id) {
net::URLRequestContextGetter*
-TestBrowserContext::GetRequestContextForStoragePartition(
+TestBrowserContext::CreateRequestContextForStoragePartition(
const FilePath& partition_path,
- bool in_memory) {
+ bool in_memory,
+ scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
+ blob_protocol_handler,
+ scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
+ file_system_protocol_handler,
+ scoped_ptr<net::URLRequestJobFactory::Interceptor>
+ developer_protocol_handler) {
return NULL;
}

Powered by Google App Engine
This is Rietveld 408576698