summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/api/permissions
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-29 05:20:53 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-29 05:20:53 +0000
commit44bab15b645a8dab8d391e212ab8d6976551f4bd (patch)
tree993b9f685b5ab4161486b552869669e578ea499b /chrome/browser/extensions/api/permissions
parent1fd496147f651ccbe83ea5dae5e3b06a6ab039d6 (diff)
downloadchromium_src-44bab15b645a8dab8d391e212ab8d6976551f4bd.zip
chromium_src-44bab15b645a8dab8d391e212ab8d6976551f4bd.tar.gz
chromium_src-44bab15b645a8dab8d391e212ab8d6976551f4bd.tar.bz2
Extensions: Make it possible for permission parsing code to return a detailed error message.
BUG=337758 Review URL: https://codereview.chromium.org/141743005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247624 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/api/permissions')
-rw-r--r--chrome/browser/extensions/api/permissions/permissions_api_helpers.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/extensions/api/permissions/permissions_api_helpers.cc b/chrome/browser/extensions/api/permissions/permissions_api_helpers.cc
index 2991d79..fd70ba7 100644
--- a/chrome/browser/extensions/api/permissions/permissions_api_helpers.cc
+++ b/chrome/browser/extensions/api/permissions/permissions_api_helpers.cc
@@ -71,6 +71,7 @@ scoped_refptr<PermissionSet> UnpackPermissionSet(
const Permissions& permissions,
bool allow_file_access,
std::string* error) {
+ DCHECK(error);
APIPermissionSet apis;
std::vector<std::string>* permissions_list = permissions.permissions.get();
if (permissions_list) {
@@ -107,7 +108,7 @@ scoped_refptr<PermissionSet> UnpackPermissionSet(
}
CHECK(permission);
- if (!permission->FromValue(permission_json.get())) {
+ if (!permission->FromValue(permission_json.get(), NULL)) {
*error = ErrorUtils::FormatErrorMessage(kInvalidParameter, *it);
return NULL;
}