Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 8033001: Delegate decision what site instances can be rendered in what process to chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698