| 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 2c2d2fdb87e87dd07c5e90337cba8498d1f5e6a3..247f935a16248f3796a21a4a500e9fb61212c3e5 100644
|
| --- a/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc
|
| +++ b/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc
|
| @@ -373,11 +373,9 @@ bool ChromeContentBrowserClientExtensionsPart::CanCommitURL(
|
| content::RenderProcessHost* process_host, const GURL& url) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
|
|
| - // We need to let most extension URLs commit in any process, since this can
|
| - // be allowed due to web_accessible_resources. Most hosted app URLs may also
|
| - // load in any process (e.g., in an iframe). However, the Chrome Web Store
|
| - // cannot be loaded in iframes and should never be requested outside its
|
| - // process.
|
| + // Hosted app URLs may load in any process (e.g., in an iframe). However, the
|
| + // Chrome Web Store, and other extensions should never be requested outside
|
| + // their process.
|
| ExtensionRegistry* registry =
|
| ExtensionRegistry::Get(process_host->GetBrowserContext());
|
| if (!registry)
|
| @@ -385,13 +383,16 @@ bool ChromeContentBrowserClientExtensionsPart::CanCommitURL(
|
|
|
| const Extension* new_extension =
|
| registry->enabled_extensions().GetExtensionOrAppByURL(url);
|
| - if (new_extension && new_extension->is_hosted_app() &&
|
| - new_extension->id() == kWebStoreAppId &&
|
| - !ProcessMap::Get(process_host->GetBrowserContext())
|
| - ->Contains(new_extension->id(), process_host->GetID())) {
|
| - return false;
|
| - }
|
| - return true;
|
| + if (!new_extension)
|
| + return true;
|
| +
|
| + if (new_extension->id() == kWebStoreAppId)
|
| + DCHECK(new_extension->is_hosted_app());
|
| + if (new_extension->is_hosted_app() && new_extension->id() != kWebStoreAppId)
|
| + return true;
|
| +
|
| + return ProcessMap::Get(process_host->GetBrowserContext())
|
| + ->Contains(new_extension->id(), process_host->GetID());
|
| }
|
|
|
| // static
|
|
|