Index: chrome/browser/extensions/chrome_content_browser_client_extensions_part.h |
diff --git a/chrome/browser/extensions/chrome_content_browser_client_extensions_part.h b/chrome/browser/extensions/chrome_content_browser_client_extensions_part.h |
index 8982d5271a418fac9dfd9a473c7c5c9d4b32fb00..90309b6c41a11776d4c687929a7bd2fab99a7c52 100644 |
--- a/chrome/browser/extensions/chrome_content_browser_client_extensions_part.h |
+++ b/chrome/browser/extensions/chrome_content_browser_client_extensions_part.h |
@@ -34,9 +34,6 @@ class ChromeContentBrowserClientExtensionsPart |
const GURL& effective_site_url); |
static bool CanCommitURL(content::RenderProcessHost* process_host, |
const GURL& url); |
- static bool IsIllegalOrigin(content::ResourceContext* resource_context, |
- int child_process_id, |
- const GURL& origin); |
static bool IsSuitableHost(Profile* profile, |
content::RenderProcessHost* process_host, |
const GURL& site_url); |
@@ -91,6 +88,24 @@ class ChromeContentBrowserClientExtensionsPart |
base::CommandLine* command_line, |
content::RenderProcessHost* process, |
Profile* profile) override; |
+ void ResourceDispatcherHostCreated() override; |
+ |
+ // This callback is registered on the ResourceDispatcherHost for the chrome |
+ // extension Origin scheme. We determine whether the extension origin is |
+ // valid. Please see the IsIllegalOrigin() function. |
+ static void OnHttpHeaderReceived( |
+ const std::string& header, |
+ const std::string& value, |
+ int child_id, |
+ content::ResourceContext* resource_context, |
+ content::OnHeaderProcessedCallback callback); |
+ |
+ // Determines whether the extension |origin| passed in can be committed by |
+ // the process identified by |child_id| and returns true or false |
+ // accordingly. Please refer to the implementation for more information. |
+ static bool IsIllegalOrigin(content::ResourceContext* resource_context, |
+ int child_id, |
+ const GURL& origin); |
DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClientExtensionsPart); |
}; |