| Index: chrome/browser/extensions/extensions_service.cc
|
| diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
|
| index 3fb4a9104b5da0d191dd0e11865b251e4f90415a..815ee49256721c5ca23800d0271770fc79df71aa 100644
|
| --- a/chrome/browser/extensions/extensions_service.cc
|
| +++ b/chrome/browser/extensions/extensions_service.cc
|
| @@ -533,7 +533,7 @@ void ExtensionsService::LoadComponentExtensions() {
|
| // In order for the --apps-gallery-url switch to work with the gallery
|
| // process isolation, we must insert any provided value into the component
|
| // app's launch url and web extent.
|
| - if (extension->id() == extension_misc::kWebStoreAppId ) {
|
| + if (extension->id() == extension_misc::kWebStoreAppId) {
|
| GURL gallery_url(CommandLine::ForCurrentProcess()
|
| ->GetSwitchValueASCII(switches::kAppsGalleryURL));
|
| if (gallery_url.is_valid()) {
|
| @@ -1255,6 +1255,16 @@ Extension* ExtensionsService::GetExtensionByWebExtent(const GURL& url) {
|
| return NULL;
|
| }
|
|
|
| +bool ExtensionsService::ExtensionBindingsAllowed(const GURL& url) {
|
| + // Allow bindings for all packaged extension.
|
| + if (GetExtensionByURL(url))
|
| + return true;
|
| +
|
| + // Allow bindings for all component, hosted apps.
|
| + Extension* extension = GetExtensionByWebExtent(url);
|
| + return (extension && extension->location() == Extension::COMPONENT);
|
| +}
|
| +
|
| Extension* ExtensionsService::GetExtensionByOverlappingWebExtent(
|
| const ExtensionExtent& extent) {
|
| for (size_t i = 0; i < extensions_.size(); ++i) {
|
|
|