Index: content/browser/site_instance.cc |
diff --git a/content/browser/site_instance.cc b/content/browser/site_instance.cc |
index cd68b7b027140532d9d195ac4be1ffd6bd015745..3f7f82785bb02ef99afd5dc820034fed73e582ac 100644 |
--- a/content/browser/site_instance.cc |
+++ b/content/browser/site_instance.cc |
@@ -71,7 +71,7 @@ RenderProcessHost* SiteInstance::GetProcess() { |
// See if we should reuse an old process |
if (RenderProcessHost::ShouldTryToUseExistingProcessHost()) |
process_ = RenderProcessHost::GetExistingProcessHost( |
- browsing_instance_->browser_context(), GetRendererType()); |
+ browsing_instance_->browser_context(), site_); |
// Otherwise (or if that fails), create a new one. |
if (!process_) { |
@@ -129,7 +129,9 @@ bool SiteInstance::HasWrongProcessForURL(const GURL& url) const { |
// process is not (or vice versa), make sure we notice and fix it. |
GURL effective_url = GetEffectiveURL(browsing_instance_->browser_context(), |
url); |
- return effective_url.SchemeIs(chrome::kExtensionScheme) != |
+ content::ContentBrowserClient* browser = |
+ content::GetContentClient()->browser(); |
+ return browser->ShouldRunInPrivilegedProcess(effective_url) != |
process_->is_extension_process(); |
jam
2011/09/26 16:28:15
note: it's not just kExtensionScheme that we don't
|
} |
@@ -220,30 +222,6 @@ GURL SiteInstance::GetEffectiveURL(content::BrowserContext* browser_context, |
GetEffectiveURL(browser_context, url); |
} |
-/*static*/ |
-RenderProcessHost::Type SiteInstance::RendererTypeForURL(const GURL& url) { |
- if (!url.is_valid()) |
- return RenderProcessHost::TYPE_NORMAL; |
- |
- if (url.SchemeIs(chrome::kExtensionScheme)) |
- return RenderProcessHost::TYPE_EXTENSION; |
- |
- // TODO(erikkay) creis recommends using UseWebUIForURL instead. |
- if (content::WebUIFactory::Get()->HasWebUIScheme(url)) |
- return RenderProcessHost::TYPE_WEBUI; |
- |
- return RenderProcessHost::TYPE_NORMAL; |
-} |
- |
-RenderProcessHost::Type SiteInstance::GetRendererType() { |
- // We may not have a site at this point, which generally means this is a |
- // normal navigation. |
- if (!has_site_) |
- return RenderProcessHost::TYPE_NORMAL; |
- |
- return RendererTypeForURL(site_); |
-} |
- |
void SiteInstance::Observe(int type, |
const NotificationSource& source, |
const NotificationDetails& details) { |