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

Unified Diff: chrome/browser/profiles/profile_impl_io_data.h

Issue 11308362: Add StoragePartition's ProtocolHandlers at URLRequestContext construction time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync (r175140) Created 7 years, 12 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/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 0f79bd0f67e7663713f1d3911a7d087a2a6e53d7..a7293d845d44bd141f8bb52aa225d62f8a9977f8 100644
--- a/chrome/browser/profiles/profile_impl_io_data.h
+++ b/chrome/browser/profiles/profile_impl_io_data.h
@@ -32,11 +32,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,
@@ -48,11 +44,34 @@ 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::Interceptor>
+ developer_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::Interceptor>
+ developer_protocol_handler) const;
+
base::Callback<ChromeURLDataManagerBackend*(void)>
GetChromeURLDataManagerBackendGetter() const;
content::ResourceContext* GetResourceContext() const;
@@ -66,10 +85,6 @@ class ProfileImplIOData : public ProfileIOData {
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;
@@ -144,15 +159,27 @@ 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::Interceptor>
+ developer_protocol_handler) const OVERRIDE;
virtual void InitializeExtensionsRequestContext(
ProfileParams* profile_params) const OVERRIDE;
virtual ChromeURLRequestContext* InitializeAppRequestContext(
ChromeURLRequestContext* main_context,
const StoragePartitionDescriptor& partition_descriptor,
scoped_ptr<net::URLRequestJobFactory::Interceptor>
- 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::Interceptor>
+ developer_protocol_handler) const OVERRIDE;
virtual ChromeURLRequestContext* InitializeMediaRequestContext(
ChromeURLRequestContext* original_context,
const StoragePartitionDescriptor& partition_descriptor) const OVERRIDE;
@@ -163,7 +190,13 @@ class ProfileImplIOData : public ProfileIOData {
ChromeURLRequestContext* main_context,
const StoragePartitionDescriptor& partition_descriptor,
scoped_ptr<net::URLRequestJobFactory::Interceptor>
- 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::Interceptor>
+ developer_protocol_handler) const OVERRIDE;
virtual ChromeURLRequestContext*
AcquireIsolatedMediaRequestContext(
ChromeURLRequestContext* app_context,

Powered by Google App Engine
This is Rietveld 408576698