Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(999)

Unified Diff: chrome/common/extensions/extension_set.cc

Issue 8312005: Ignore paths when matching patterns for extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
+}

Powered by Google App Engine
This is Rietveld 408576698