Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(954)

Unified Diff: chrome/browser/extensions/api/permissions/permissions_api_helpers.cc

Issue 141743005: Extensions: Make it possible for permission parsing code to return a detailed error message. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_prefs_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/permissions/permissions_api_helpers.cc
===================================================================
--- chrome/browser/extensions/api/permissions/permissions_api_helpers.cc (revision 247036)
+++ chrome/browser/extensions/api/permissions/permissions_api_helpers.cc (working copy)
@@ -71,6 +71,7 @@
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 @@
}
CHECK(permission);
- if (!permission->FromValue(permission_json.get())) {
+ if (!permission->FromValue(permission_json.get(), NULL)) {
*error = ErrorUtils::FormatErrorMessage(kInvalidParameter, *it);
return NULL;
}
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_prefs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698