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

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: updates 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..015a0438a7d8c2f33af27310a7fa17137ca35912 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* extension_process_manager =
+ profile->GetExtensionProcessManager();
+
+ // Maybe NULL during tests.
+ if (!extension_process_manager)
+ return true;
+
+ bool is_extension_host =
+ process_host->is_extension_process() ||
+ extension_process_manager->IsExtensionProcessHost(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);
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/extensions/extension_process_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698