| Index: chrome/common/extensions/permissions/permission_set.h
|
| diff --git a/chrome/common/extensions/permissions/permission_set.h b/chrome/common/extensions/permissions/permission_set.h
|
| index 85475feede832a50fc60413e64a9e9d55f43d611..6110044bbd74105ca4a0123eab5043caf062be22 100644
|
| --- a/chrome/common/extensions/permissions/permission_set.h
|
| +++ b/chrome/common/extensions/permissions/permission_set.h
|
| @@ -16,6 +16,7 @@
|
| #include "base/string16.h"
|
| #include "chrome/common/extensions/extension.h"
|
| #include "chrome/common/extensions/permissions/api_permission.h"
|
| +#include "chrome/common/extensions/permissions/api_permission_set.h"
|
| #include "chrome/common/extensions/permissions/permission_message.h"
|
| #include "chrome/common/extensions/url_pattern_set.h"
|
|
|
| @@ -93,6 +94,14 @@ class PermissionSet
|
| // Returns true if the set has the specified API permission.
|
| bool HasAPIPermission(APIPermission::ID permission) const;
|
|
|
| + // Returns true if the set allows the given permission with the default
|
| + // permission detal.
|
| + bool CheckAPIPermission(APIPermission::ID permission) const;
|
| +
|
| + // Returns true if the set allows the given permission and permission detail.
|
| + bool CheckAPIPermissionWithDetail(APIPermission::ID permission,
|
| + const APIPermissionDetail::CheckParam* detail) const;
|
| +
|
| // Returns true if the permissions in this set grant access to the specified
|
| // |function_name|.
|
| bool HasAccessToFunction(const std::string& function_name) const;
|
| @@ -142,6 +151,8 @@ class PermissionSet
|
|
|
| ~PermissionSet();
|
|
|
| + void AddAPIPermission(APIPermission::ID id);
|
| +
|
| static std::set<std::string> GetDistinctHosts(
|
| const URLPatternSet& host_patterns,
|
| bool include_rcd,
|
|
|