| Index: ash/system/chromeos/power/power_status_view.cc
|
| diff --git a/ash/system/chromeos/power/power_status_view.cc b/ash/system/chromeos/power/power_status_view.cc
|
| index 9aa461c90cdcd80369056eb54cf5b3cf5708c78f..d4278755b4ba458a35ea0d267e8981bb0afe3361 100644
|
| --- a/ash/system/chromeos/power/power_status_view.cc
|
| +++ b/ash/system/chromeos/power/power_status_view.cc
|
| @@ -32,6 +32,13 @@ const int kLabelMinWidth = 120;
|
| const int kPaddingBetweenBatteryStatusAndIcon = 3;
|
| // Minimum battery percentage rendered in UI.
|
| const int kMinBatteryPercent = 1;
|
| +
|
| +base::string16 GetChargingUnreliableString() {
|
| + // String is intentionally hard-coded in English for backport to M28 only.
|
| + // See crbug.com/246336 for details.
|
| + return UTF8ToUTF16("Low-power charger");
|
| +}
|
| +
|
| } // namespace
|
|
|
| PowerStatusView::PowerStatusView(ViewType view_type,
|
| @@ -123,9 +130,8 @@ void PowerStatusView::UpdateTextForDefaultView() {
|
| battery_time_status =
|
| rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BATTERY_FULL);
|
| } else if (supply_status_.battery_percentage < 0.0f) {
|
| - battery_time_status =
|
| - is_charging_unreliable ?
|
| - rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BATTERY_CHARGING_UNRELIABLE) :
|
| + battery_time_status = is_charging_unreliable ?
|
| + GetChargingUnreliableString() :
|
| rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_BATTERY_CALCULATING);
|
| } else {
|
| battery_percentage = l10n_util::GetStringFUTF16(
|
| @@ -133,8 +139,7 @@ void PowerStatusView::UpdateTextForDefaultView() {
|
| base::IntToString16(TrayPower::GetRoundedBatteryPercentage(
|
| supply_status_.battery_percentage)));
|
| if (is_charging_unreliable) {
|
| - battery_time_status = rb.GetLocalizedString(
|
| - IDS_ASH_STATUS_TRAY_BATTERY_CHARGING_UNRELIABLE);
|
| + battery_time_status = GetChargingUnreliableString();
|
| } else {
|
| if (supply_status_.is_calculating_battery_time) {
|
| battery_time_status =
|
| @@ -207,9 +212,7 @@ void PowerStatusView::UpdateTextForNotificationView() {
|
| }
|
|
|
| if (is_charging_unreliable) {
|
| - time_label_->SetText(
|
| - ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
|
| - IDS_ASH_STATUS_TRAY_BATTERY_CHARGING_UNRELIABLE));
|
| + time_label_->SetText(GetChargingUnreliableString());
|
| } else if (supply_status_.is_calculating_battery_time) {
|
| time_label_->SetText(
|
| ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
|
|
|