diff options
author | penghuang@chromium.org <penghuang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-21 13:02:15 +0000 |
---|---|---|
committer | penghuang@chromium.org <penghuang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-21 13:02:15 +0000 |
commit | ecb9ad1bad6b9261c4e11ca70d035eef83e3e6f4 (patch) | |
tree | ba6cd8ab4857860a61c76346d2b1a910b8a1a7c8 /chrome/browser/extensions/api/permissions | |
parent | 4ee07c648c466ba555dba96f76455a5c53007385 (diff) | |
download | chromium_src-ecb9ad1bad6b9261c4e11ca70d035eef83e3e6f4.zip chromium_src-ecb9ad1bad6b9261c4e11ca70d035eef83e3e6f4.tar.gz chromium_src-ecb9ad1bad6b9261c4e11ca70d035eef83e3e6f4.tar.bz2 |
Rename APIPermission to APIPermissionInfo and APIPermissionDetail to APIPermission
BUG=130222
TEST=unit_tests
Review URL: https://chromiumcodereview.appspot.com/10837309
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152549 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/api/permissions')
-rw-r--r-- | chrome/browser/extensions/api/permissions/permissions_api.cc | 4 | ||||
-rw-r--r-- | chrome/browser/extensions/api/permissions/permissions_api_helpers.cc | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/extensions/api/permissions/permissions_api.cc b/chrome/browser/extensions/api/permissions/permissions_api.cc index 7110f7b..e9bf415 100644 --- a/chrome/browser/extensions/api/permissions/permissions_api.cc +++ b/chrome/browser/extensions/api/permissions/permissions_api.cc @@ -86,7 +86,7 @@ bool RemovePermissionsFunction::RunImpl() { APIPermissionSet apis = permissions->apis(); for (APIPermissionSet::const_iterator i = apis.begin(); i != apis.end(); ++i) { - if (!i->permission()->supports_optional()) { + if (!i->info()->supports_optional()) { error_ = ExtensionErrorUtils::FormatErrorMessage( kNotWhitelistedError, i->name()); return false; @@ -161,7 +161,7 @@ bool RequestPermissionsFunction::RunImpl() { APIPermissionSet apis = requested_permissions_->apis(); for (APIPermissionSet::const_iterator i = apis.begin(); i != apis.end(); ++i) { - if (!i->permission()->supports_optional()) { + if (!i->info()->supports_optional()) { error_ = ExtensionErrorUtils::FormatErrorMessage( kNotWhitelistedError, i->name()); return false; diff --git a/chrome/browser/extensions/api/permissions/permissions_api_helpers.cc b/chrome/browser/extensions/api/permissions/permissions_api_helpers.cc index 5bbedd7..d637c99 100644 --- a/chrome/browser/extensions/api/permissions/permissions_api_helpers.cc +++ b/chrome/browser/extensions/api/permissions/permissions_api_helpers.cc @@ -56,13 +56,13 @@ scoped_refptr<PermissionSet> UnpackPermissionSet( PermissionsInfo* info = PermissionsInfo::GetInstance(); for (std::vector<std::string>::iterator it = permissions_list->begin(); it != permissions_list->end(); ++it) { - APIPermission* permission = info->GetByName(*it); - if (!permission) { + const APIPermissionInfo* permission_info = info->GetByName(*it); + if (!permission_info) { *error = ExtensionErrorUtils::FormatErrorMessage( kUnknownPermissionError, *it); return NULL; } - apis.insert(permission->id()); + apis.insert(permission_info->id()); } } |