| Index: chrome/common/extensions/extension.h
|
| diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
|
| index 79ea12d7aeb128d28540d863daf78f38f3386edb..cb5bd4b37f628965370ba7691c79e9911aaadbf2 100644
|
| --- a/chrome/common/extensions/extension.h
|
| +++ b/chrome/common/extensions/extension.h
|
| @@ -71,6 +71,9 @@ class Extension {
|
| static const int kBrowserActionIconMaxSize;
|
|
|
| // Each permission is a module that the extension is permitted to use.
|
| + static const char* kTabPermission;
|
| + static const char* kBookmarkPermission;
|
| +
|
| static const char* kPermissionNames[];
|
| static const size_t kNumPermissions;
|
|
|
| @@ -210,6 +213,12 @@ class Extension {
|
| // specified URL.
|
| bool CanAccessHost(const GURL& url) const;
|
|
|
| + // Returns true if the extension has the specified API permission.
|
| + bool HasApiPermission(const std::string& permission) const {
|
| + return std::find(api_permissions_.begin(), api_permissions_.end(),
|
| + permission) != api_permissions_.end();
|
| + }
|
| +
|
| // Returns the set of hosts that the extension effectively has access to. This
|
| // is used in the permissions UI and is a combination of the hosts accessible
|
| // through content scripts and the hosts accessible through XHR.
|
|
|