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

Unified Diff: content/public/browser/content_browser_client.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: content/public/browser/content_browser_client.h
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 68ca0ae087be337260351cd1a23874935fddeb1a..3550f2b8622b047d1d87da72a90b8513d5bff4cf 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -10,12 +10,14 @@
#include <vector>
#include "base/callback_forward.h"
+#include "base/memory/scoped_ptr.h"
#include "content/public/browser/file_descriptor_info.h"
#include "content/public/common/socket_permission_request.h"
#include "content/public/common/content_client.h"
#include "content/public/common/window_container_type.h"
#include "net/base/mime_util.h"
#include "net/cookies/canonical_cookie.h"
+#include "net/url_request/url_request_job_factory.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresenter.h"
#if defined(OS_POSIX) && !defined(OS_MACOSX)
@@ -47,6 +49,7 @@ class SSLCertRequestInfo;
class SSLInfo;
class URLRequest;
class URLRequestContext;
+class URLRequestContextGetter;
class X509Certificate;
}
@@ -131,6 +134,32 @@ class CONTENT_EXPORT ContentBrowserClient {
virtual bool ShouldUseProcessPerSite(BrowserContext* browser_context,
const GURL& effective_url);
+ // Creates the main net::URLRequestContextGetter. Should only be called once
+ // per ContentBrowserClient object.
+ // TODO(ajwong): Remove once http://crbug.com/159193 is resolved.
+ virtual net::URLRequestContextGetter* CreateRequestContext(
+ BrowserContext* browser_context,
+ 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);
+
+ // Creates the net::URLRequestContextGetter for a StoragePartition. Should
+ // only be called once per partition_path per ContentBrowserClient object.
+ // TODO(ajwong): Remove once http://crbug.com/159193 is resolved.
+ virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
+ BrowserContext* browser_context,
+ 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);
+
// Returns whether a specified URL is handled by the embedder's internal
// protocol handlers.
virtual bool IsHandledURL(const GURL& url);

Powered by Google App Engine
This is Rietveld 408576698