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

Unified Diff: ash/system/power/power_status_view.cc

Issue 11175077: Fix the low battery notification string from mins -> minutes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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: ash/system/power/power_status_view.cc
diff --git a/ash/system/power/power_status_view.cc b/ash/system/power/power_status_view.cc
index 4f4ba07f06ac326bd3c1ac687733bf8926b01755..08a6de50372e41ff826789fc0a3719e2630e8d51 100644
--- a/ash/system/power/power_status_view.cc
+++ b/ash/system/power/power_status_view.cc
@@ -4,8 +4,6 @@
#include "ash/system/power/power_status_view.h"
-#include "ash/shell.h"
-#include "ash/shell_delegate.h"
#include "ash/system/power/tray_power.h"
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_views.h"
@@ -188,13 +186,12 @@ void PowerStatusView::UpdateTextForNotificationView() {
// This is a low battery warning, which prompts user when battery
// time left is not much (ie in minutes).
min = hour * 60 + min;
- ShellDelegate* delegate = Shell::GetInstance()->delegate();
- if (delegate) {
- time_label_->SetText(delegate->GetTimeRemainingString(
- base::TimeDelta::FromMinutes(min)));
- } else {
- time_label_->SetText(string16());
- }
+ time_label_->SetText(
+ l10n_util::GetStringFUTF16(
+ min > 1 ?
+ IDS_ASH_STATUS_TRAY_BATTERY_TIME_UNTIL_EMPTY_PLURAL_MIN :
+ IDS_ASH_STATUS_TRAY_BATTERY_TIME_UNTIL_EMPTY_SINGULAR_MIN,
+ base::IntToString16(min)));
}
} else {
time_label_->SetText(string16());

Powered by Google App Engine
This is Rietveld 408576698