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

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

Issue 1094873002: Extensions: Switch to new permission message system, part V (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 28b7c97fdafbad59c32347dd6aef1086409034d2..444184af4a2a53b97747b06f37139c80df85cdf3 100644
--- a/extensions/common/permissions/api_permission.h
+++ b/extensions/common/permissions/api_permission.h
@@ -34,14 +34,17 @@ class APIPermission {
// The IDs of all permissions available to apps. Add as many permissions here
// as needed to generate meaningful permission messages. Add the rules for the
// messages to ChromePermissionMessageProvider.
- // Remove permissions from this list if they have no longer have a
- // corresponding API permission and no permission message.
+ // Do not reorder this enumeration or remove any entries. If you need to add a
+ // new entry, add it just prior to kEnumBoundary.
// TODO(sashab): Move this to a more central location, and rename it to
// PermissionID.
enum ID {
// Error codes.
- kInvalid = -2,
- kUnknown = -1,
+ kInvalid,
+ kUnknown,
+
+ // For use in histograms.
+ kNone,
Marc Treib 2015/04/17 13:09:33 Not quite sure about this: The existing histograms
Devlin 2015/04/27 17:58:03 I agree - it's weird to have "None" as a unique pe
Marc Treib 2015/04/28 12:31:32 I've removed the "None" type for the new histogram
// Real permissions.
kAccessibilityFeaturesModify,
@@ -237,6 +240,9 @@ class APIPermission {
kUsbDeviceUnknownProduct,
kUsbDeviceUnknownVendor,
+ // Last entry: Add new entries above and ensure to update the
+ // "ExtensionPermission3" enum in tools/metrics/histograms/histograms.xml
+ // (by running update_extension_functions.py).
kEnumBoundary
};

Powered by Google App Engine
This is Rietveld 408576698