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

Unified Diff: extensions/common/permissions/api_permission.h

Issue 221353003: Make unknown extension subpermissions warnings instead of errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 6 years, 9 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
Index: extensions/common/permissions/api_permission.h
diff --git a/extensions/common/permissions/api_permission.h b/extensions/common/permissions/api_permission.h
index 636675666daac6e489b2d6fa6fcdaa6b71764390..1a913c73b217f614dd0ce613489a5529781c45b7 100644
--- a/extensions/common/permissions/api_permission.h
+++ b/extensions/common/permissions/api_permission.h
@@ -210,8 +210,13 @@ class APIPermission {
virtual bool Equal(const APIPermission* rhs) const = 0;
// Parses the APIPermission from |value|. Returns false if an error happens
- // and optionally set |error| if |error| is not NULL.
- virtual bool FromValue(const base::Value* value, std::string* error) = 0;
+ // and optionally set |error| if |error| is not NULL. If |value| represents
+ // multiple permissions, some are invalid, and |unhandled_permissions| is
+ // not NULL, the invalid ones are put into |unhandled_permissions| and the
+ // function returns true.
+ virtual bool FromValue(const base::Value* value,
+ std::string* error,
+ std::vector<std::string>* unhandled_permissions) = 0;
// Stores this into a new created |value|.
virtual scoped_ptr<base::Value> ToValue() const = 0;

Powered by Google App Engine
This is Rietveld 408576698