Index: chrome/browser/profiles/profile_impl_io_data.h |
diff --git a/chrome/browser/profiles/profile_impl_io_data.h b/chrome/browser/profiles/profile_impl_io_data.h |
index b0d8d2ad0292963c22a191e87fa6fa3a83f82d98..94acde88894a429847515eae4525f4d2d7c503b1 100644 |
--- a/chrome/browser/profiles/profile_impl_io_data.h |
+++ b/chrome/browser/profiles/profile_impl_io_data.h |
@@ -33,11 +33,7 @@ class ProfileImplIOData : public ProfileIOData { |
explicit Handle(Profile* profile); |
~Handle(); |
- bool HasMainRequestContext() const { |
- return main_request_context_getter_ != NULL; |
- } |
- |
- // Init() must be called before ~Handle(). It records all the necessary |
+ // Init() must be called before ~Handle(). It records most of the |
// parameters needed to construct a ChromeURLRequestContextGetter. |
void Init(const FilePath& cookie_path, |
const FilePath& server_bound_cert_path, |
@@ -49,26 +45,51 @@ class ProfileImplIOData : public ProfileIOData { |
const FilePath& profile_path, |
const FilePath& infinite_cache_path, |
chrome_browser_net::Predictor* predictor, |
- PrefService* local_state, |
- IOThread* io_thread, |
bool restore_old_session_cookies, |
quota::SpecialStoragePolicy* special_storage_policy); |
+ // These Create*ContextGetter() functions are only exposed because the |
+ // circular relationship between Profile, ProfileIOData::Handle, and the |
+ // ChromeURLRequestContextGetter factories requires Profile be able to call |
+ // these functions. |
+ scoped_refptr<ChromeURLRequestContextGetter> |
+ CreateMainRequestContextGetter( |
+ 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, |
+ PrefService* local_state, |
+ IOThread* io_thread) const; |
+ scoped_refptr<ChromeURLRequestContextGetter> |
+ CreateIsolatedAppRequestContextGetter( |
+ 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::ProtocolHandler> |
+ developer_protocol_handler, |
+ scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
+ chrome_protocol_handler, |
+ scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
+ chrome_devtools_protocol_handler) const; |
+ |
content::ResourceContext* GetResourceContext() const; |
// GetResourceContextNoInit() does not call LazyInitialize() so it can be |
// safely be used during initialization. |
content::ResourceContext* GetResourceContextNoInit() const; |
scoped_refptr<ChromeURLRequestContextGetter> |
- GetMainRequestContextGetter() const; |
- scoped_refptr<ChromeURLRequestContextGetter> |
GetMediaRequestContextGetter() const; |
scoped_refptr<ChromeURLRequestContextGetter> |
GetExtensionsRequestContextGetter() const; |
scoped_refptr<ChromeURLRequestContextGetter> |
- GetIsolatedAppRequestContextGetter( |
- const FilePath& partition_path, |
- bool in_memory) const; |
- scoped_refptr<ChromeURLRequestContextGetter> |
GetIsolatedMediaRequestContextGetter( |
const FilePath& partition_path, |
bool in_memory) const; |
@@ -143,15 +164,35 @@ class ProfileImplIOData : public ProfileIOData { |
ProfileImplIOData(); |
virtual ~ProfileImplIOData(); |
- virtual void LazyInitializeInternal( |
- ProfileParams* profile_params) const OVERRIDE; |
+ virtual void InitializeInternal( |
+ ProfileParams* profile_params, |
+ 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) const OVERRIDE; |
virtual void InitializeExtensionsRequestContext( |
ProfileParams* profile_params) const OVERRIDE; |
virtual ChromeURLRequestContext* InitializeAppRequestContext( |
ChromeURLRequestContext* main_context, |
const StoragePartitionDescriptor& partition_descriptor, |
scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
- protocol_handler_interceptor) const OVERRIDE; |
+ protocol_handler_interceptor, |
+ 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) const OVERRIDE; |
virtual ChromeURLRequestContext* InitializeMediaRequestContext( |
ChromeURLRequestContext* original_context, |
const StoragePartitionDescriptor& partition_descriptor) const OVERRIDE; |
@@ -162,7 +203,17 @@ class ProfileImplIOData : public ProfileIOData { |
ChromeURLRequestContext* main_context, |
const StoragePartitionDescriptor& partition_descriptor, |
scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
- protocol_handler_interceptor) const OVERRIDE; |
+ protocol_handler_interceptor, |
+ 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) const OVERRIDE; |
virtual ChromeURLRequestContext* |
AcquireIsolatedMediaRequestContext( |
ChromeURLRequestContext* app_context, |