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

Unified Diff: chrome/browser/ui/views/apps/app_info_dialog/app_info_permissions_panel.cc

Issue 1049513002: Use the ICU syntax message for plural formatting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment update Created 5 years, 8 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/browser/ui/views/apps/app_info_dialog/app_info_permissions_panel.cc
diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_permissions_panel.cc b/chrome/browser/ui/views/apps/app_info_dialog/app_info_permissions_panel.cc
index aceecf2d0572b51a8af72324820c12008fe6118b..2003639308e8789413dd26777be89912f788d31f 100644
--- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_permissions_panel.cc
+++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_permissions_panel.cc
@@ -294,19 +294,8 @@ int AppInfoPermissionsPanel::GetRetainedFileCount() const {
}
base::string16 AppInfoPermissionsPanel::GetRetainedFileHeading() const {
- const int kRetainedFilesMessageIDs[6] = {
- IDS_APPLICATION_INFO_RETAINED_FILES_DEFAULT,
- IDS_APPLICATION_INFO_RETAINED_FILE_SINGULAR,
- IDS_APPLICATION_INFO_RETAINED_FILES_ZERO,
- IDS_APPLICATION_INFO_RETAINED_FILES_TWO,
- IDS_APPLICATION_INFO_RETAINED_FILES_FEW,
- IDS_APPLICATION_INFO_RETAINED_FILES_MANY,
- };
- std::vector<int> message_ids(
- kRetainedFilesMessageIDs,
- kRetainedFilesMessageIDs + arraysize(kRetainedFilesMessageIDs));
-
- return l10n_util::GetPluralStringFUTF16(message_ids, GetRetainedFileCount());
+ return l10n_util::GetPluralStringFUTF16(
+ IDS_APPLICATION_INFO_RETAINED_FILES, GetRetainedFileCount());
}
const std::vector<base::string16>
@@ -346,20 +335,8 @@ int AppInfoPermissionsPanel::GetRetainedDeviceCount() const {
}
base::string16 AppInfoPermissionsPanel::GetRetainedDeviceHeading() const {
- const int kRetainedDevicesMessageIDs[6] = {
- IDS_APPLICATION_INFO_RETAINED_DEVICES_DEFAULT,
- IDS_APPLICATION_INFO_RETAINED_DEVICE_SINGULAR,
- IDS_APPLICATION_INFO_RETAINED_DEVICES_ZERO,
- IDS_APPLICATION_INFO_RETAINED_DEVICES_TWO,
- IDS_APPLICATION_INFO_RETAINED_DEVICES_FEW,
- IDS_APPLICATION_INFO_RETAINED_DEVICES_MANY,
- };
- std::vector<int> message_ids(
- kRetainedDevicesMessageIDs,
- kRetainedDevicesMessageIDs + arraysize(kRetainedDevicesMessageIDs));
-
- return l10n_util::GetPluralStringFUTF16(message_ids,
- GetRetainedDeviceCount());
+ return l10n_util::GetPluralStringFUTF16(
+ IDS_APPLICATION_INFO_RETAINED_DEVICES, GetRetainedDeviceCount());
}
const std::vector<base::string16> AppInfoPermissionsPanel::GetRetainedDevices()

Powered by Google App Engine
This is Rietveld 408576698