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

Unified Diff: chrome/common/extensions/permissions/chrome_permission_message_provider.h

Issue 1006453002: Extensions: Prepare switch to new permission message system (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 5 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: chrome/common/extensions/permissions/chrome_permission_message_provider.h
diff --git a/chrome/common/extensions/permissions/chrome_permission_message_provider.h b/chrome/common/extensions/permissions/chrome_permission_message_provider.h
index 068d8bd295a660d9cd9a2ac7f387cf6a2959c0ad..a734ab080c1a43a905b233201a36daac2a5a4ac0 100644
--- a/chrome/common/extensions/permissions/chrome_permission_message_provider.h
+++ b/chrome/common/extensions/permissions/chrome_permission_message_provider.h
@@ -26,15 +26,21 @@ class ChromePermissionMessageProvider : public PermissionMessageProvider {
~ChromePermissionMessageProvider() override;
// PermissionMessageProvider implementation.
- PermissionMessages GetPermissionMessages(
+ // See comments in permission_message_provider.h. TL;DR: You want to use only
+ // GetPermissionMessageStrings to get messages, not the *Legacy* or
+ // *Coalesced* methods.
sashab 2015/03/13 18:26:20 Maybe TODO: Make the legacy/coalesced ones private
Marc Treib 2015/03/16 09:11:04 Good idea! I'll do that once I've switched all cal
+ PermissionMessageStrings GetPermissionMessageStrings(
+ const PermissionSet* permissions,
+ Manifest::Type extension_type) const override;
+ PermissionMessageIDs GetLegacyPermissionMessageIDs(
const PermissionSet* permissions,
Manifest::Type extension_type) const override;
CoalescedPermissionMessages GetCoalescedPermissionMessages(
const PermissionIDSet& permissions) const override;
- std::vector<base::string16> GetWarningMessages(
+ std::vector<base::string16> GetLegacyWarningMessages(
const PermissionSet* permissions,
Manifest::Type extension_type) const override;
- std::vector<base::string16> GetWarningMessagesDetails(
+ std::vector<base::string16> GetLegacyWarningMessagesDetails(
const PermissionSet* permissions,
Manifest::Type extension_type) const override;
bool IsPrivilegeIncrease(const PermissionSet* old_permissions,
@@ -45,6 +51,10 @@ class ChromePermissionMessageProvider : public PermissionMessageProvider {
Manifest::Type extension_type) const override;
private:
+ // TODO(treib): Remove this once we've switched to the new system.
+ PermissionMessages GetPermissionMessages(const PermissionSet* permissions,
+ Manifest::Type extension_type) const;
+
// Gets the permission messages for the API permissions. Also adds any
// permission IDs from API Permissions to |permission_ids|.
// TODO(sashab): Deprecate the |permissions| argument, and rename this to

Powered by Google App Engine
This is Rietveld 408576698