Index: ash/system/update/tray_update.cc |
diff --git a/ash/system/update/tray_update.cc b/ash/system/update/tray_update.cc |
index 55a82c5649a29a7510b5637802f1ce406392c228..7b7ea192777d072ec63d5d6471772da419689d7d 100644 |
--- a/ash/system/update/tray_update.cc |
+++ b/ash/system/update/tray_update.cc |
@@ -60,6 +60,7 @@ bool TrayUpdate::update_required_ = false; |
mojom::UpdateSeverity TrayUpdate::severity_ = mojom::UpdateSeverity::NONE; |
// static |
bool TrayUpdate::factory_reset_required_ = false; |
+mojom::UpdateType TrayUpdate::update_type_ = mojom::UpdateType::NONE; |
// The "restart to update" item in the system tray menu. |
class TrayUpdate::UpdateView : public ActionableView { |
@@ -77,11 +78,16 @@ class TrayUpdate::UpdateView : public ActionableView { |
IconColorForUpdateSeverity(owner->severity_, true))); |
tri_view->AddView(TriView::Container::START, image); |
- base::string16 label_text = |
- owner->factory_reset_required_ |
- ? bundle.GetLocalizedString( |
- IDS_ASH_STATUS_TRAY_RESTART_AND_POWERWASH_TO_UPDATE) |
- : bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_UPDATE); |
+ base::string16 label_text; |
+ if (owner->factory_reset_required_) { |
+ label_text = bundle.GetLocalizedString( |
+ IDS_ASH_STATUS_TRAY_RESTART_AND_POWERWASH_TO_UPDATE); |
+ } else if (owner->update_type_ == mojom::UpdateType::FLASH) { |
+ label_text = bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_UPDATE_FLASH); |
+ } else { |
+ label_text = bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_UPDATE); |
+ } |
+ |
SetAccessibleName(label_text); |
auto* label = TrayPopupUtils::CreateDefaultLabel(); |
label->SetText(label_text); |
@@ -123,11 +129,13 @@ views::View* TrayUpdate::CreateDefaultView(LoginStatus status) { |
} |
void TrayUpdate::ShowUpdateIcon(mojom::UpdateSeverity severity, |
- bool factory_reset_required) { |
+ bool factory_reset_required, |
+ mojom::UpdateType update_type) { |
// Cache update info so we can create the default view when the menu opens. |
update_required_ = true; |
severity_ = severity; |
factory_reset_required_ = factory_reset_required; |
+ update_type_ = update_type; |
// Show the icon in the tray. |
SetIconColor(IconColorForUpdateSeverity(severity_, false)); |