Chromium Code Reviews| Index: chrome/browser/chrome_content_browser_client.cc |
| diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc |
| index bae8e9fb5dfe0b0695bf72bedcd0743ef6b83b6e..0c2c9923702c31e38bc7fa43b3ef9c7ca4ebba8d 100644 |
| --- a/chrome/browser/chrome_content_browser_client.cc |
| +++ b/chrome/browser/chrome_content_browser_client.cc |
| @@ -247,6 +247,24 @@ bool ChromeContentBrowserClient::IsURLSameAsAnySiteInstance(const GURL& url) { |
| url == GURL(chrome::kChromeUIShorthangURL); |
| } |
| +bool ChromeContentBrowserClient::IsSuitableHost( |
| + RenderProcessHost* process_host, |
| + const GURL& site_url) { |
| + Profile* profile = |
| + Profile::FromBrowserContext(process_host->browser_context()); |
| + ExtensionProcessManager* process_manager = |
|
Aaron Boodman
2011/09/27 19:26:49
Nit: I would prefer to call this variable extensio
jochen (gone - plz use gerrit)
2011/09/27 20:41:40
Done.
|
| + profile->GetExtensionProcessManager(); |
| + |
| + // Maybe NULL during tests. |
| + if (!process_manager) |
| + return true; |
| + |
| + bool is_extension_host = |
| + process_host->is_extension_process() || |
|
Aaron Boodman
2011/09/27 19:26:49
Eventually, this field is going to have to go. Wil
jochen (gone - plz use gerrit)
2011/09/27 20:41:40
currently this flag is set and queried only in chr
|
| + process_manager->IsProcessHostWithBindings(process_host->id()); |
| + return site_url.SchemeIs(chrome::kExtensionScheme) == is_extension_host; |
| +} |
| + |
| std::string ChromeContentBrowserClient::GetCanonicalEncodingNameByAliasName( |
| const std::string& alias_name) { |
| return CharacterEncoding::GetCanonicalEncodingNameByAliasName(alias_name); |