Chromium Code Reviews

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

Issue 2846034: Split out the bookmark permission into its own line in ExtensionInstallUI. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « chrome/browser/extensions/extension_install_ui.cc ('k') | 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 0d4c10a8b181ee691c835667547b2969036d3515..dba09bddd59af65de31760c21fc1127007cd9049 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -89,6 +89,11 @@ class Extension {
static const int kBrowserActionIconMaxSize;
// Each permission is a module that the extension is permitted to use.
+ //
+ // NOTE: If you add a permission, consider also changing:
+ // - Extension::GetSimplePermissions()
+ // - Extension::IsPrivilegeIncrease()
+ // - ExtensionInstallUI::GetV2Warnings()
static const char* kBackgroundPermission;
static const char* kBookmarkPermission;
static const char* kExperimentalPermission;
@@ -101,6 +106,13 @@ class Extension {
static const char* kPermissionNames[];
static const size_t kNumPermissions;
+ // A "simple permission" is one that has a one-to-one mapping with a message
+ // that is displayed in the install UI. This is in contrast to more complex
+ // permissions like http access, where the exact message displayed depends on
+ // several factors.
+ typedef std::map<std::string, string16> SimplePermissions;
+ static const SimplePermissions& GetSimplePermissions();
+
// An NPAPI plugin included in the extension.
struct PluginInfo {
FilePath path; // Path to the plugin.
« no previous file with comments | « chrome/browser/extensions/extension_install_ui.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine