| 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..09ede43431c1134ff2680092d8b393d2272f4203 100644
|
| --- a/chrome/common/extensions/extension_set.cc
|
| +++ b/chrome/common/extensions/extension_set.cc
|
| @@ -74,10 +74,25 @@ 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.url());
|
| +}
|
| +
|
| +const Extension* ExtensionSet::GetByWebExtent(const GURL& url) const {
|
| + for (ExtensionMap::const_iterator iter = extensions_.begin();
|
| + iter != extensions_.end(); ++iter) {
|
| + if (iter->second->web_extent().MatchesURL(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;
|
|
|