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

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

Issue 51433002: Enable permission warnings from ManifestHandlers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Working on adding ManifestPermissionSet to PermissionSet. Created 7 years, 1 month 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: chrome/common/extensions/manifest_handler.h
diff --git a/chrome/common/extensions/manifest_handler.h b/chrome/common/extensions/manifest_handler.h
index 42f989bc4bb0e9dc53617d0773be08257fd02aef..431188e73980b44d1e3a4010c2ece834d9d1b63d 100644
--- a/chrome/common/extensions/manifest_handler.h
+++ b/chrome/common/extensions/manifest_handler.h
@@ -64,6 +64,13 @@ class ManifestHandler {
// (new MyManifestHandler)->Register();
void Register();
+ virtual void AddPermissionWarningMessages(
+ const Extension* extension,
+ std::vector<string16>& messages) const;
+ virtual void AddPermissionWarningMessagesDetails(
+ const Extension* extension,
+ std::vector<string16>& messages) const;
+
// Calling FinalizeRegistration indicates that there are no more
// manifest handlers to be registered.
static void FinalizeRegistration();
@@ -79,6 +86,11 @@ class ManifestHandler {
std::string* error,
std::vector<InstallWarning>* warnings);
+ static std::vector<string16> GetExtensionPermissionWarningMessages(
+ const Extension* extension);
+ static std::vector<string16> GetExtensionPermissionWarningMessagesDetails(
+ const Extension* extension);
+
protected:
// A convenience method for handlers that only register for 1 key,
// so that they can define keys() { return SingleKey(kKey); }
@@ -108,6 +120,11 @@ class ManifestHandlerRegistry {
std::string* error,
std::vector<InstallWarning>* warnings);
+ std::vector<string16> GetExtensionPermissionWarningMessages(
+ const Extension* extension);
+ std::vector<string16> GetExtensionPermissionWarningMessagesDetails(
+ const Extension* extension);
+
// Overrides the current global ManifestHandlerRegistry with
// |registry|, returning the current one.
static ManifestHandlerRegistry* SetForTesting(

Powered by Google App Engine
This is Rietveld 408576698