summaryrefslogtreecommitdiffstats
path: root/android_webview/browser/aw_content_browser_client.cc
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-07 12:30:06 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-07 12:30:06 +0000
commit672c8c1e10e9b8f8b3416ed812cdfeae16005505 (patch)
tree75d427330154213748efe55b8f3163603faf3de1 /android_webview/browser/aw_content_browser_client.cc
parentd679c866738497a6c73a7836bdf441831f024be0 (diff)
downloadchromium_src-672c8c1e10e9b8f8b3416ed812cdfeae16005505.zip
chromium_src-672c8c1e10e9b8f8b3416ed812cdfeae16005505.tar.gz
chromium_src-672c8c1e10e9b8f8b3416ed812cdfeae16005505.tar.bz2
Add chrome-search: access from Instant overlay
Enables the Instant NTP page access to: chrome-search://theme/*, chrome-search://favicon/*, and chrome-search://thumb/*. This CL has a number of aspects to make the installed theme background image available to the Instant overlay: 1. Utilizes the new chrome-search: scheme that is accessible only to the Instant overlay's render process. This is enforced on the renderer side by WebKit::WebSecurityPolicy facilities. This is enforced on the browser side by the InstantIOContext::ShouldServiceRequest and URLDataSource::ShouldServiceRequest facilities. 2. Whitelists the chrome-search://theme origin to be made available to the specific Instant overlay's origin/url. 3. Backend CSS that sets the appropriate background image that resides in the chrome-search://theme origin. 4. A small refactoring of the Instant tests to support mix-in usage of InstantTestBase. BUG=172408, 134937 TEST=InstantPolicyTest.SearchSchemePolicy R=sreeram@chromium.org, creis@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=186347 Review URL: https://chromiumcodereview.appspot.com/11896113 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186680 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/browser/aw_content_browser_client.cc')
-rw-r--r--android_webview/browser/aw_content_browser_client.cc32
1 files changed, 4 insertions, 28 deletions
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc
index 3d8185e..78d8e27 100644
--- a/android_webview/browser/aw_content_browser_client.cc
+++ b/android_webview/browser/aw_content_browser_client.cc
@@ -118,21 +118,9 @@ void AwContentBrowserClient::RenderProcessHostCreated(
net::URLRequestContextGetter*
AwContentBrowserClient::CreateRequestContext(
content::BrowserContext* browser_context,
- 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) {
+ content::ProtocolHandlerMap* protocol_handlers) {
DCHECK(browser_context_.get() == browser_context);
- return browser_context_->CreateRequestContext(
- blob_protocol_handler.Pass(), file_system_protocol_handler.Pass(),
- developer_protocol_handler.Pass(), chrome_protocol_handler.Pass(),
- chrome_devtools_protocol_handler.Pass());
+ return browser_context_->CreateRequestContext(protocol_handlers);
}
net::URLRequestContextGetter*
@@ -140,22 +128,10 @@ AwContentBrowserClient::CreateRequestContextForStoragePartition(
content::BrowserContext* browser_context,
const base::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::ProtocolHandler>
- developer_protocol_handler,
- scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
- chrome_protocol_handler,
- scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
- chrome_devtools_protocol_handler) {
+ content::ProtocolHandlerMap* protocol_handlers) {
DCHECK(browser_context_.get() == browser_context);
return browser_context_->CreateRequestContextForStoragePartition(
- partition_path, in_memory, blob_protocol_handler.Pass(),
- file_system_protocol_handler.Pass(),
- developer_protocol_handler.Pass(), chrome_protocol_handler.Pass(),
- chrome_devtools_protocol_handler.Pass());
+ partition_path, in_memory, protocol_handlers);
}
std::string AwContentBrowserClient::GetCanonicalEncodingNameByAliasName(