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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 11308362: Add StoragePartition's ProtocolHandlers at URLRequestContext construction time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Eliminate OffTheRecordProfileIOData::Handle::GetMainRequestContextGetter Created 7 years, 11 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/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index a430cc9f1044ff36ecfe806ed5f969ccd188e20c..63a59282e9110a6d1df3d63972cbf1da73e7abea 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -689,6 +689,41 @@ bool ChromeContentBrowserClient::ShouldUseProcessPerSite(
return true;
}
+net::URLRequestContextGetter*
+ChromeContentBrowserClient::CreateRequestContext(
+ content::BrowserContext* browser_context,
+ 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) {
+ Profile* profile = Profile::FromBrowserContext(browser_context);
+ return profile->CreateRequestContext(blob_protocol_handler.Pass(),
+ file_system_protocol_handler.Pass(),
+ developer_protocol_handler.Pass());
+}
+
+net::URLRequestContextGetter*
+ChromeContentBrowserClient::CreateRequestContextForStoragePartition(
+ content::BrowserContext* browser_context,
+ const FilePath& partition_path,
+ 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) {
+ Profile* profile = Profile::FromBrowserContext(browser_context);
+ return profile->CreateRequestContextForStoragePartition(
+ partition_path,
+ in_memory,
+ blob_protocol_handler.Pass(),
+ file_system_protocol_handler.Pass(),
+ developer_protocol_handler.Pass());
+}
+
bool ChromeContentBrowserClient::IsHandledURL(const GURL& url) {
return ProfileIOData::IsHandledURL(url);
}

Powered by Google App Engine
This is Rietveld 408576698