| Index: chrome/common/extensions/extension_set.cc
|
| diff --git a/chrome/common/extensions/extension_set.cc b/chrome/common/extensions/extension_set.cc
|
| index c99220b407214057e8ff24164a8cd11dcf6c51f7..38d0c4a4ee264f5c164650ee68bf612a5d11f968 100644
|
| --- a/chrome/common/extensions/extension_set.cc
|
| +++ b/chrome/common/extensions/extension_set.cc
|
| @@ -74,10 +74,26 @@ const Extension* ExtensionSet::GetByURL(const ExtensionURLInfo& info) const {
|
| if (info.url().SchemeIs(chrome::kExtensionScheme))
|
| return GetByID(info.url().host());
|
|
|
| - ExtensionMap::const_iterator i = extensions_.begin();
|
| - for (; i != extensions_.end(); ++i) {
|
| - if (i->second->web_extent().MatchesURL(info.url()))
|
| - return i->second.get();
|
| + return GetByWebExtent(info);
|
| +}
|
| +
|
| +const Extension* ExtensionSet::GetByWebExtent(
|
| + const ExtensionURLInfo& info) const {
|
| + for (ExtensionMap::const_iterator iter = extensions_.begin();
|
| + iter != extensions_.end(); ++iter) {
|
| + if (iter->second->web_extent().MatchesURL(info.url()))
|
| + return iter->second.get();
|
| + }
|
| +
|
| + return NULL;
|
| +}
|
| +
|
| +const Extension* ExtensionSet::GetByOverlappingWebExtent(
|
| + const URLPatternSet& extent) const {
|
| + for (ExtensionMap::const_iterator iter = extensions_.begin();
|
| + iter != extensions_.end(); ++iter) {
|
| + if (iter->second->web_extent().OverlapsWith(extent))
|
| + return iter->second.get();
|
| }
|
|
|
| return NULL;
|
|
|