diff options
author | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-10 22:57:09 +0000 |
---|---|---|
committer | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-10 22:57:09 +0000 |
commit | 7571263c66e3e4595172bfad813e04720f7629e5 (patch) | |
tree | 2c4dda408616075a56b738c3514fd8d23ce6b280 /android_webview | |
parent | 29743ef07193d32282644d420f5fa7f4ac8e73e2 (diff) | |
download | chromium_src-7571263c66e3e4595172bfad813e04720f7629e5.zip chromium_src-7571263c66e3e4595172bfad813e04720f7629e5.tar.gz chromium_src-7571263c66e3e4595172bfad813e04720f7629e5.tar.bz2 |
Allow content layer to pass ProtocolInterceptors when we create URLRequestContext
Currently we pass protocol_handlers that belong to content layer
in StoragePartitionImplMap when we create URLRequestContexts for
storage partitions.
This patch also allows content layer to pass additional protocol
interceptors, so that content modules / web platform modules
(namely, ServiceWorker) can insert its own protocol interceptors.
*** Most changes are just for plumbing to pass through one more arg ***
* The additional protocol interceptors are created in:
content/browser/storage_partition_impl_map.cc
(where we also create protocol_handlers for content modules,
e.g. blob, filesystem etc)
* which is passed to: ChromeContentBrowserClient::CreateRequestContext
-> Profile -> ProfileIOData, and then
* chained to the URLJobFactory for a newly created
URLRequestContext in ProfileIOData::SetUpJobFactoryDefaults().
BUG=349319
Review URL: https://codereview.chromium.org/187223003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256055 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview')
-rw-r--r-- | android_webview/browser/aw_content_browser_client.cc | 11 | ||||
-rw-r--r-- | android_webview/browser/aw_content_browser_client.h | 6 |
2 files changed, 11 insertions, 6 deletions
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc index dcca91d..90f4def 100644 --- a/android_webview/browser/aw_content_browser_client.cc +++ b/android_webview/browser/aw_content_browser_client.cc @@ -209,11 +209,13 @@ void AwContentBrowserClient::RenderProcessWillLaunch( host->AddFilter(new AwContentsMessageFilter(host->GetID())); } -net::URLRequestContextGetter* -AwContentBrowserClient::CreateRequestContext( +net::URLRequestContextGetter* AwContentBrowserClient::CreateRequestContext( content::BrowserContext* browser_context, - content::ProtocolHandlerMap* protocol_handlers) { + content::ProtocolHandlerMap* protocol_handlers, + content::ProtocolHandlerScopedVector protocol_interceptors) { DCHECK(browser_context_.get() == browser_context); + // TODO(mkosiba,kinuko): protocol_interceptors should be hooked up in the + // downstream. (crbug.com/350286) return browser_context_->CreateRequestContext(protocol_handlers); } @@ -222,7 +224,8 @@ AwContentBrowserClient::CreateRequestContextForStoragePartition( content::BrowserContext* browser_context, const base::FilePath& partition_path, bool in_memory, - content::ProtocolHandlerMap* protocol_handlers) { + content::ProtocolHandlerMap* protocol_handlers, + content::ProtocolHandlerScopedVector protocol_interceptors) { DCHECK(browser_context_.get() == browser_context); return browser_context_->CreateRequestContextForStoragePartition( partition_path, in_memory, protocol_handlers); diff --git a/android_webview/browser/aw_content_browser_client.h b/android_webview/browser/aw_content_browser_client.h index 9ed0c6e..eb601cd 100644 --- a/android_webview/browser/aw_content_browser_client.h +++ b/android_webview/browser/aw_content_browser_client.h @@ -45,12 +45,14 @@ class AwContentBrowserClient : public content::ContentBrowserClient { content::RenderProcessHost* host) OVERRIDE; virtual net::URLRequestContextGetter* CreateRequestContext( content::BrowserContext* browser_context, - content::ProtocolHandlerMap* protocol_handlers) OVERRIDE; + content::ProtocolHandlerMap* protocol_handlers, + content::ProtocolHandlerScopedVector protocol_interceptors) OVERRIDE; virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( content::BrowserContext* browser_context, const base::FilePath& partition_path, bool in_memory, - content::ProtocolHandlerMap* protocol_handlers) OVERRIDE; + content::ProtocolHandlerMap* protocol_handlers, + content::ProtocolHandlerScopedVector protocol_interceptors) OVERRIDE; virtual std::string GetCanonicalEncodingNameByAliasName( const std::string& alias_name) OVERRIDE; virtual void AppendExtraCommandLineSwitches(CommandLine* command_line, |