Index: chrome/common/extensions/extension.h |
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h |
index 9f2dc9ba2c6f0594bd5c9449b5a66da5dedc5a31..66e12f2170ffeb4ce11fbc51d75d7b2bdd384c64 100644 |
--- a/chrome/common/extensions/extension.h |
+++ b/chrome/common/extensions/extension.h |
@@ -278,9 +278,11 @@ class Extension { |
} |
// Returns true if the extension has the specified API permission. |
+ static bool HasApiPermission(const std::vector<std::string>& api_permissions, |
+ const std::string& permission); |
+ |
bool HasApiPermission(const std::string& permission) const { |
- return std::find(api_permissions_.begin(), api_permissions_.end(), |
- permission) != api_permissions_.end(); |
+ return HasApiPermission(this->api_permissions(), permission); |
} |
// Returns the set of hosts that the extension effectively has access to. This |