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/content/shell/shell_browser_context.h b/content/shell/shell_browser_context.h
index fa61e66..9146499 100644
--- a/content/shell/shell_browser_context.h
+++ b/content/shell/shell_browser_context.h
@@ -10,6 +10,7 @@
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/public/browser/browser_context.h"
+#include "content/public/browser/content_browser_client.h"
 #include "net/url_request/url_request_job_factory.h"
 
 namespace content {
@@ -46,29 +47,11 @@
   virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
 
   net::URLRequestContextGetter* CreateRequestContext(
-      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);
+      ProtocolHandlerMap* protocol_handlers);
   net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
       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);
+      ProtocolHandlerMap* protocol_handlers);
 
  private:
   class ShellResourceContext;