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

Unified Diff: chrome/common/extensions/permissions/permission_set.cc

Issue 18854021: Making the extension permissions dialog scrollable, when needed (adding expandable sections for thi… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Even more param reductions Created 7 years, 5 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/permission_set.cc
diff --git a/chrome/common/extensions/permissions/permission_set.cc b/chrome/common/extensions/permissions/permission_set.cc
index d11162c69a5f206a4193bce6a38e984be229ed45..1014adc2354326e27da20a3e59cf70dbc362e72b 100644
--- a/chrome/common/extensions/permissions/permission_set.cc
+++ b/chrome/common/extensions/permissions/permission_set.cc
@@ -261,7 +261,8 @@ PermissionMessages PermissionSet::GetPermissionMessages(
if (HasEffectiveFullAccess()) {
messages.push_back(PermissionMessage(
PermissionMessage::kFullAccess,
- l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT_WARNING_FULL_ACCESS)));
+ l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT_WARNING_FULL_ACCESS),
+ string16()));
return messages;
}
@@ -308,6 +309,18 @@ std::vector<string16> PermissionSet::GetWarningMessages(
return messages;
}
+std::vector<string16> PermissionSet::GetWarningMessagesDetails(
+ Manifest::Type extension_type) const {
+ std::vector<string16> messages;
+ PermissionMessages permissions = GetPermissionMessages(extension_type);
+
+ for (PermissionMessages::const_iterator i = permissions.begin();
+ i != permissions.end(); ++i)
+ messages.push_back(i->details());
+
+ return messages;
+}
+
bool PermissionSet::IsEmpty() const {
// Not default if any host permissions are present.
if (!(explicit_hosts().is_empty() && scriptable_hosts().is_empty()))
@@ -550,7 +563,8 @@ std::set<PermissionMessage> PermissionSet::GetHostPermissionMessages(
if (HasEffectiveAccessToAllHosts()) {
messages.insert(PermissionMessage(
PermissionMessage::kHostsAll,
- l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT_WARNING_ALL_HOSTS)));
+ l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT_WARNING_ALL_HOSTS),
+ string16()));
} else {
PermissionMessages additional_warnings =
GetChromeSchemePermissionWarnings(effective_hosts_);

Powered by Google App Engine
This is Rietveld 408576698