summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-26 06:35:02 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-26 06:35:02 +0000
commit22c966cde1eab5e2c25c295467b5a7549ab1324c (patch)
tree3088411fc203d8d7a8ac39ccbfe5fa5d263e74f1 /chrome/browser/extensions
parent0bf0ce3331ea4e597b47126dd71c6448fdc4fc5f (diff)
downloadchromium_src-22c966cde1eab5e2c25c295467b5a7549ab1324c.zip
chromium_src-22c966cde1eab5e2c25c295467b5a7549ab1324c.tar.gz
chromium_src-22c966cde1eab5e2c25c295467b5a7549ab1324c.tar.bz2
Re-implement app overlap detection with new extent syntax.
BUG=47445 Review URL: http://codereview.chromium.org/2876009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50929 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/extensions_service.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
index 5f22ed9..6518b6f 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -1019,7 +1019,11 @@ Extension* ExtensionsService::GetExtensionByWebExtent(const GURL& url) {
Extension* ExtensionsService::GetExtensionByOverlappingWebExtent(
const ExtensionExtent& extent) {
- // TODO(aa): Make this work for the new extents. http://crbug.com/47445.
+ for (size_t i = 0; i < extensions_.size(); ++i) {
+ if (extensions_[i]->web_extent().OverlapsWith(extent))
+ return extensions_[i];
+ }
+
return NULL;
}