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

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

Issue 324273003: When read and modify permissions for "accessibility" are requested or read and write permissions fo… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Shorteneing the string ID. Created 6 years, 6 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/permissions/chrome_permission_message_provider.cc
diff --git a/chrome/common/extensions/permissions/chrome_permission_message_provider.cc b/chrome/common/extensions/permissions/chrome_permission_message_provider.cc
index 6fa8e5b9c0e14fbaf31c5074cdf31ba242b6a184..bdad89a1c233ea7dc571243c198ba6c9f661ef60 100644
--- a/chrome/common/extensions/permissions/chrome_permission_message_provider.cc
+++ b/chrome/common/extensions/permissions/chrome_permission_message_provider.cc
@@ -111,6 +111,8 @@ std::vector<base::string16> ChromePermissionMessageProvider::GetWarningMessages(
bool media_galleries_read = false;
bool media_galleries_copy_to = false;
bool media_galleries_delete = false;
+ bool accessibility_read = false;
+ bool accessibility_write = false;
for (PermissionMessages::const_iterator i = messages.begin();
i != messages.end(); ++i) {
switch (i->id()) {
@@ -129,6 +131,12 @@ std::vector<base::string16> ChromePermissionMessageProvider::GetWarningMessages(
case PermissionMessage::kMediaGalleriesAllGalleriesDelete:
media_galleries_delete = true;
break;
+ case PermissionMessage::kAccessibilityFeaturesRead:
+ accessibility_read = true;
+ break;
+ case PermissionMessage::kAccessibilityFeaturesModify:
+ accessibility_write = true;
+ break;
default:
break;
not at google - send to devlin 2014/06/19 20:01:03 we can replace o lines 109-143 by putting these pe
}
@@ -147,6 +155,16 @@ std::vector<base::string16> ChromePermissionMessageProvider::GetWarningMessages(
continue;
}
}
+ if (accessibility_read && accessibility_write) {
+ if (id == PermissionMessage::kAccessibilityFeaturesRead) {
+ message_strings.push_back(l10n_util::GetStringUTF16(
+ IDS_EXTENSION_PROMPT_WARNING_ACCESSIBILITY_FEATURES_READ_MODIFY));
+ continue;
+ } else if (id == PermissionMessage::kAccessibilityFeaturesModify) {
+ // The combined message will be pushed above.
+ continue;
+ }
+ }
if (media_galleries_read &&
(media_galleries_copy_to || media_galleries_delete)) {
if (id == PermissionMessage::kMediaGalleriesAllGalleriesRead) {
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698