| Index: chrome/browser/profiles/profile_io_data.h
|
| diff --git a/chrome/browser/profiles/profile_io_data.h b/chrome/browser/profiles/profile_io_data.h
|
| index ba57faf3df4123397e484eb063271a78fd0ca27f..406fa98c5aa76c7958fd562473aceb110dc31921 100644
|
| --- a/chrome/browser/profiles/profile_io_data.h
|
| +++ b/chrome/browser/profiles/profile_io_data.h
|
| @@ -19,6 +19,7 @@
|
| #include "chrome/browser/io_thread.h"
|
| #include "chrome/browser/net/chrome_url_request_context.h"
|
| #include "chrome/browser/profiles/storage_partition_descriptor.h"
|
| +#include "content/public/browser/content_browser_client.h"
|
| #include "content/public/browser/resource_context.h"
|
| #include "net/cookies/cookie_monster.h"
|
| #include "net/http/http_network_session.h"
|
| @@ -77,23 +78,20 @@ class ProfileIOData {
|
| // net::URLRequest.
|
| static bool IsHandledURL(const GURL& url);
|
|
|
| + // Utility to install additional WebUI handlers into the |job_factory|.
|
| + // Ownership of the handlers is transfered from |protocol_handlers|
|
| + // to the |job_factory|.
|
| + static void InstallProtocolHandlers(
|
| + net::URLRequestJobFactoryImpl* job_factory,
|
| + content::ProtocolHandlerMap* protocol_handlers);
|
| +
|
| // Called by Profile.
|
| content::ResourceContext* GetResourceContext() const;
|
|
|
| // Initializes the ProfileIOData object and primes the RequestContext
|
| // generation. Must be called prior to any of the Get*() methods other than
|
| // GetResouceContext or GetMetricsEnabledStateOnIOThread.
|
| - void Init(
|
| - 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;
|
| + void Init(content::ProtocolHandlerMap* protocol_handlers) const;
|
|
|
| ChromeURLRequestContext* GetMainRequestContext() const;
|
| ChromeURLRequestContext* GetMediaRequestContext() const;
|
| @@ -103,16 +101,7 @@ class ProfileIOData {
|
| const StoragePartitionDescriptor& partition_descriptor,
|
| scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
|
| 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;
|
| + content::ProtocolHandlerMap* protocol_handlers) const;
|
| ChromeURLRequestContext* GetIsolatedMediaRequestContext(
|
| ChromeURLRequestContext* app_context,
|
| const StoragePartitionDescriptor& partition_descriptor) const;
|
| @@ -386,16 +375,7 @@ class ProfileIOData {
|
| // should use the static helper functions above to implement this.
|
| 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 = 0;
|
| + content::ProtocolHandlerMap* protocol_handlers) const = 0;
|
|
|
| // Initializes the RequestContext for extensions.
|
| virtual void InitializeExtensionsRequestContext(
|
| @@ -407,16 +387,7 @@ class ProfileIOData {
|
| const StoragePartitionDescriptor& details,
|
| scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
|
| 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 = 0;
|
| + content::ProtocolHandlerMap* protocol_handlers) const = 0;
|
|
|
| // Does an on-demand initialization of a media RequestContext for the given
|
| // isolated app.
|
| @@ -434,16 +405,7 @@ class ProfileIOData {
|
| const StoragePartitionDescriptor& partition_descriptor,
|
| scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
|
| 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 = 0;
|
| + content::ProtocolHandlerMap* protocol_handlers) const = 0;
|
| virtual ChromeURLRequestContext*
|
| AcquireIsolatedMediaRequestContext(
|
| ChromeURLRequestContext* app_context,
|
|
|