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

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

Issue 615453002: Change the size in the App Info dialog to always display in MB (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback Created 6 years, 3 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/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.cc
diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.cc b/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.cc
index 99f48583df0f72acc056accbaf9b0e25a25a8200..06627aa9b21fa8ba4d98dacda3285f3a9523aa89 100644
--- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.cc
+++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.cc
@@ -323,7 +323,14 @@ void AppInfoSummaryPanel::StartCalculatingAppSize() {
}
void AppInfoSummaryPanel::OnAppSizeCalculated(int64 app_size_in_bytes) {
- size_value_->SetText(ui::FormatBytes(app_size_in_bytes));
+ const int one_mebibyte_in_bytes = 1024 * 1024;
+ if (app_size_in_bytes < one_mebibyte_in_bytes) {
+ size_value_->SetText(
+ l10n_util::GetStringUTF16(IDS_APPLICATION_INFO_SIZE_SMALL_LABEL));
+ } else {
+ size_value_->SetText(ui::FormatBytesWithUnits(
+ app_size_in_bytes, ui::DATA_UNITS_MEBIBYTE, true));
+ }
}
base::Time AppInfoSummaryPanel::GetInstalledTime() const {
« 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