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

Unified Diff: chrome/common/extensions/extension.h

Issue 164335: Add a method to classify what permission class an extension is in, with unit (Closed)
Patch Set: Created 11 years, 4 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/common/extensions/extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension.h
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index 7969e964713e21164fe4428d8f88c26f480ce124..1452014c4ac7308077d7c44fc46263b713af1157 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -62,6 +62,15 @@ class Extension {
static const char* kPermissionNames[];
static const size_t kNumPermissions;
+ // A classification of how dangerous an extension can be, based on what it has
+ // access to.
+ enum PermissionClass {
+ PERMISSION_CLASS_LOW = 0, // green
+ PERMISSION_CLASS_MEDIUM, // yellow
+ PERMISSION_CLASS_HIGH, // orange
+ PERMISSION_CLASS_FULL, // red
+ };
+
// An NPAPI plugin included in the extension.
struct PluginInfo {
FilePath path; // Path to the plugin.
@@ -205,6 +214,8 @@ class Extension {
// the browser might load (like themes and page action icons).
std::set<FilePath> GetBrowserImages();
+ PermissionClass GetPermissionClass();
+
// Runtime data:
// Put dynamic data about the state of a running extension below.
« no previous file with comments | « no previous file | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698