| Index: chrome/browser/extensions/extension_service.cc
|
| diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
|
| index c2c32d7f515c995e9c4b493b45757160bd220347..a5cd49ddf51c4b92dd98bbfa081f5824239028c6 100644
|
| --- a/chrome/browser/extensions/extension_service.cc
|
| +++ b/chrome/browser/extensions/extension_service.cc
|
| @@ -2165,12 +2165,16 @@ const Extension* ExtensionService::GetExtensionByWebExtent(const GURL& url) {
|
| }
|
|
|
| bool ExtensionService::ExtensionBindingsAllowed(const GURL& url) {
|
| - // Allow bindings for all packaged extension.
|
| - if (GetExtensionByURL(url))
|
| + // Allow bindings for all packaged extensions.
|
| + // Note that GetExtensionByURL may return an Extension for hosted apps
|
| + // if the URL came from GetEffectiveURL.
|
| + const Extension* extension = GetExtensionByURL(url);
|
| + if (extension && extension->GetType() != Extension::TYPE_HOSTED_APP)
|
| return true;
|
|
|
| // Allow bindings for all component, hosted apps.
|
| - const Extension* extension = GetExtensionByWebExtent(url);
|
| + if (!extension)
|
| + extension = GetExtensionByWebExtent(url);
|
| return (extension && extension->location() == Extension::COMPONENT);
|
| }
|
|
|
|
|