diff options
author | rdevlin.cronin@chromium.org <rdevlin.cronin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-05 16:16:30 +0000 |
---|---|---|
committer | rdevlin.cronin@chromium.org <rdevlin.cronin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-05 16:16:30 +0000 |
commit | d695bb139a93f2c0cab08b1801c2cddba1a39773 (patch) | |
tree | b6ee5cfc101d0506d87200f0b09d6189754834ff /extensions/common/features | |
parent | 32e8a26ae2917d695551f1e37701e0eff52879de (diff) | |
download | chromium_src-d695bb139a93f2c0cab08b1801c2cddba1a39773.zip chromium_src-d695bb139a93f2c0cab08b1801c2cddba1a39773.tar.gz chromium_src-d695bb139a93f2c0cab08b1801c2cddba1a39773.tar.bz2 |
Refactor PermissionsData pt1
In this CL, we:
- Make PermissionsData not-so-static. Only methods which either don't rely on
knowledge of specific permissions or methods to get/create the object are
static.
- Separate runtime permissions knowledge from manifest parsing (PermissionsData
vs PermissionsParser)
- Move required/optional permissions access into PermissionsParser.
- Handle the locking issues.
BUG=379356
TBR=sky@chromium.org (for c/b/ui/, no functional changes)
Review URL: https://codereview.chromium.org/309533007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275142 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/common/features')
-rw-r--r-- | extensions/common/features/permission_feature.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extensions/common/features/permission_feature.cc b/extensions/common/features/permission_feature.cc index 1831cf9..7be136d 100644 --- a/extensions/common/features/permission_feature.cc +++ b/extensions/common/features/permission_feature.cc @@ -27,7 +27,8 @@ Feature::Availability PermissionFeature::IsAvailableToContext( if (!availability.is_available()) return availability; - if (extension && !PermissionsData::HasAPIPermission(extension, name())) + if (extension && + !PermissionsData::ForExtension(extension)->HasAPIPermission(name())) return CreateAvailability(NOT_PRESENT, extension->GetType()); return CreateAvailability(IS_AVAILABLE); |