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

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

Issue 11896113: Add chrome-search: access from Instant overlay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: include nit 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
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 c3baef0e7e514da12d0b3794f353524f62538589..935e60970d0844959a2590636a337c5ee6cc04ad 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;
@@ -382,16 +371,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(
@@ -403,16 +383,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.
@@ -430,16 +401,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,

Powered by Google App Engine
This is Rietveld 408576698