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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 11308362: Add StoragePartition's ProtocolHandlers at URLRequestContext construction time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync (r181485) Created 7 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 | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/profiles/profile_impl_io_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 06716b86b8b69bca8fc1c45845b96fc5688e684d..4c658cdd92ef0c3f4dad4925071d4b2d9fce6f83 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -515,8 +515,6 @@ void ProfileImpl::DoFinalInit(bool is_new_profile) {
cache_max_size, media_cache_path, media_cache_max_size,
extensions_cookie_path, GetPath(), infinite_cache_path,
predictor_,
- g_browser_process->local_state(),
- g_browser_process->io_thread(),
restore_old_session_cookies,
GetSpecialStoragePolicy());
@@ -803,8 +801,29 @@ FilePath ProfileImpl::GetPrefFilePath() {
return pref_file_path;
}
+net::URLRequestContextGetter* ProfileImpl::CreateRequestContext(
+ scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
+ blob_protocol_handler,
+ scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
+ file_system_protocol_handler,
+ scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
+ developer_protocol_handler,
+ scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
+ chrome_protocol_handler,
+ scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
+ chrome_devtools_protocol_handler) {
+ return io_data_.CreateMainRequestContextGetter(
+ blob_protocol_handler.Pass(),
+ file_system_protocol_handler.Pass(),
+ developer_protocol_handler.Pass(),
+ chrome_protocol_handler.Pass(),
+ chrome_devtools_protocol_handler.Pass(),
+ g_browser_process->local_state(),
+ g_browser_process->io_thread());
+}
+
net::URLRequestContextGetter* ProfileImpl::GetRequestContext() {
- return io_data_.GetMainRequestContextGetter();
+ return GetDefaultStoragePartition(this)->GetURLRequestContext();
}
net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess(
@@ -846,10 +865,24 @@ net::URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() {
return io_data_.GetExtensionsRequestContextGetter();
}
-net::URLRequestContextGetter* ProfileImpl::GetRequestContextForStoragePartition(
+net::URLRequestContextGetter*
+ProfileImpl::CreateRequestContextForStoragePartition(
const FilePath& partition_path,
- bool in_memory) {
- return io_data_.GetIsolatedAppRequestContextGetter(partition_path, 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::ProtocolHandler>
+ developer_protocol_handler,
+ scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
+ chrome_protocol_handler,
+ scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
+ chrome_devtools_protocol_handler) {
+ return io_data_.CreateIsolatedAppRequestContextGetter(
+ partition_path, in_memory, blob_protocol_handler.Pass(),
+ file_system_protocol_handler.Pass(), developer_protocol_handler.Pass(),
+ chrome_protocol_handler.Pass(), chrome_devtools_protocol_handler.Pass());
}
net::SSLConfigService* ProfileImpl::GetSSLConfigService() {
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/profiles/profile_impl_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698