summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/api/permissions
diff options
context:
space:
mode:
authorpenghuang@chromium.org <penghuang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-21 13:02:15 +0000
committerpenghuang@chromium.org <penghuang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-21 13:02:15 +0000
commitecb9ad1bad6b9261c4e11ca70d035eef83e3e6f4 (patch)
treeba6cd8ab4857860a61c76346d2b1a910b8a1a7c8 /chrome/browser/extensions/api/permissions
parent4ee07c648c466ba555dba96f76455a5c53007385 (diff)
downloadchromium_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.cc4
-rw-r--r--chrome/browser/extensions/api/permissions/permissions_api_helpers.cc6
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());
}
}