| Index: chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc
|
| diff --git a/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc b/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc
|
| index e66776da517c792d1e707219f12d842e547635ae..bd993917f6b11cefc16f68255bc6060067fd902b 100644
|
| --- a/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc
|
| +++ b/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc
|
| @@ -88,7 +88,6 @@ namespace {
|
| // sure URLs are served by hosts with the right set of privileges.
|
| enum RenderProcessHostPrivilege {
|
| PRIV_NORMAL,
|
| - PRIV_HOSTED,
|
| PRIV_ISOLATED,
|
| PRIV_EXTENSION,
|
| };
|
| @@ -147,7 +146,7 @@ RenderProcessHostPrivilege GetPrivilegeRequiredByUrl(
|
| if (extension && AppIsolationInfo::HasIsolatedStorage(extension))
|
| return PRIV_ISOLATED;
|
| if (extension && extension->is_hosted_app())
|
| - return PRIV_HOSTED;
|
| + return PRIV_NORMAL;
|
| return PRIV_EXTENSION;
|
| }
|
|
|
| @@ -166,7 +165,7 @@ RenderProcessHostPrivilege GetProcessPrivilege(
|
| if (extension && AppIsolationInfo::HasIsolatedStorage(extension))
|
| return PRIV_ISOLATED;
|
| if (extension && extension->is_hosted_app())
|
| - return PRIV_HOSTED;
|
| + return PRIV_NORMAL;
|
| }
|
|
|
| return PRIV_EXTENSION;
|
| @@ -262,31 +261,6 @@ ChromeContentBrowserClientExtensionsPart::
|
| }
|
|
|
| // static
|
| -GURL ChromeContentBrowserClientExtensionsPart::GetEffectiveURL(
|
| - Profile* profile, const GURL& url) {
|
| - // If the input |url| is part of an installed app, the effective URL is an
|
| - // extension URL with the ID of that extension as the host. This has the
|
| - // effect of grouping apps together in a common SiteInstance.
|
| - ExtensionRegistry* registry = ExtensionRegistry::Get(profile);
|
| - if (!registry)
|
| - return url;
|
| -
|
| - const Extension* extension =
|
| - registry->enabled_extensions().GetHostedAppByURL(url);
|
| - if (!extension)
|
| - return url;
|
| -
|
| - // Bookmark apps do not use the hosted app process model, and should be
|
| - // treated as normal URLs.
|
| - if (extension->from_bookmark())
|
| - return url;
|
| -
|
| - // If the URL is part of an extension's web extent, convert it to an
|
| - // extension URL.
|
| - return extension->GetResourceURL(url.path());
|
| -}
|
| -
|
| -// static
|
| bool ChromeContentBrowserClientExtensionsPart::ShouldUseProcessPerSite(
|
| Profile* profile, const GURL& effective_url) {
|
| if (!effective_url.SchemeIs(kExtensionScheme))
|
| @@ -417,8 +391,9 @@ bool ChromeContentBrowserClientExtensionsPart::IsSuitableHost(
|
| // required by the site.
|
| RenderProcessHostPrivilege privilege_required =
|
| GetPrivilegeRequiredByUrl(site_url, registry);
|
| - return GetProcessPrivilege(process_host, process_map, registry) ==
|
| - privilege_required;
|
| + RenderProcessHostPrivilege privilege_of_process =
|
| + GetProcessPrivilege(process_host, process_map, registry);
|
| + return privilege_of_process == privilege_required;
|
| }
|
|
|
| // static
|
|
|