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

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

Issue 980353003: Extensions: Switch to new permission message system, part I (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup;rebase 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 d0c4614f3557d036c95fad5c6caff200ee43fcf5..cb0362a58fce4ad448406c03d9ab9d1ba6d37293 100644
--- a/chrome/common/extensions/permissions/chrome_permission_message_provider.h
+++ b/chrome/common/extensions/permissions/chrome_permission_message_provider.h
@@ -51,7 +51,8 @@ class ChromePermissionMessageProvider : public PermissionMessageProvider {
// AddAPIPermissions().
std::set<PermissionMessage> GetAPIPermissionMessages(
const PermissionSet* permissions,
- PermissionIDSet* permission_ids) const;
+ PermissionIDSet* permission_ids,
+ Manifest::Type extension_type) const;
// Gets the permission messages for the Manifest permissions. Also adds any
// permission IDs from manifest Permissions to |permission_ids|.
@@ -70,11 +71,22 @@ class ChromePermissionMessageProvider : public PermissionMessageProvider {
PermissionIDSet* permission_ids,
Manifest::Type extension_type) const;
+ // Applies coalescing rules and writes the resulting messages and their
+ // details into |message_strings| and |message_details_strings|.
+ // TODO(treib): Remove this method as soon as we've fully switched to the
+ // new system.
+ void CoalesceWarningMessages(
+ const PermissionSet* permissions,
+ Manifest::Type extension_type,
+ std::vector<base::string16>* message_strings,
+ std::vector<base::string16>* message_details_strings) const;
+
// Returns true if |new_permissions| has an elevated API privilege level
// compared to |old_permissions|.
bool IsAPIPrivilegeIncrease(
const PermissionSet* old_permissions,
- const PermissionSet* new_permissions) const;
+ const PermissionSet* new_permissions,
+ Manifest::Type extension_type) const;
// Returns true if |new_permissions| has an elevated manifest permission
// privilege level compared to |old_permissions|.

Powered by Google App Engine
This is Rietveld 408576698