| Index: chrome/common/extensions/extension_set.cc
|
| diff --git a/chrome/common/extensions/extension_set.cc b/chrome/common/extensions/extension_set.cc
|
| index 105420bc9605d368c96f8fae11fa6f772e158342..f0a72d9e861b305e919a05502421c2fc085a8f3c 100644
|
| --- a/chrome/common/extensions/extension_set.cc
|
| +++ b/chrome/common/extensions/extension_set.cc
|
| @@ -79,3 +79,14 @@ bool ExtensionSet::ExtensionBindingsAllowed(const GURL& url) const {
|
|
|
| return false;
|
| }
|
| +
|
| +bool ExtensionSet::SecurityOriginHasAPIPermission(
|
| + const std::string& origin, ExtensionAPIPermission::ID permission) const {
|
| + ExtensionMap::const_iterator i = extensions_.begin();
|
| + for (; i != extensions_.end(); ++i) {
|
| + if (i->second->web_extent().MatchesSecurityOrigin(origin) &&
|
| + i->second->HasAPIPermission(permission))
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
|
|