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
[email protected], [email protected]
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
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 3eba46e..1cafe996 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -176,6 +176,8 @@
extensions::kExtensionScheme);
ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme(
chrome::kExtensionResourceScheme);
+ ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme(
+ chrome::kChromeSearchScheme);
#if defined(OS_MACOSX)
InitIdleMonitor();