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

Unified Diff: chrome/browser/ui/ash/system_tray_client.cc

Issue 2816253002: Display "Restart to update Adobe Flash Player" for Flash updates. (Closed)
Patch Set: Fix nits from last review Created 3 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
« no previous file with comments | « ash/system/update/tray_update_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/system_tray_client.cc
diff --git a/chrome/browser/ui/ash/system_tray_client.cc b/chrome/browser/ui/ash/system_tray_client.cc
index 36110ab7d4a690f233851e200529737da540a584..b8e63438e95b89ee187df9998e8ba2c27adb6e54 100644
--- a/chrome/browser/ui/ash/system_tray_client.cc
+++ b/chrome/browser/ui/ash/system_tray_client.cc
@@ -380,7 +380,10 @@ void SystemTrayClient::RequestRestartForUpdate() {
void SystemTrayClient::HandleUpdateAvailable() {
// Show an update icon for Chrome updates and Flash component updates.
UpgradeDetector* detector = UpgradeDetector::GetInstance();
- DCHECK(detector->notify_upgrade() || flash_update_available_);
+ bool update_available = detector->notify_upgrade() || flash_update_available_;
+ DCHECK(update_available);
+ if (!update_available)
+ return;
// Get the Chrome update severity.
ash::mojom::UpdateSeverity severity = GetUpdateSeverity(detector);
@@ -389,7 +392,14 @@ void SystemTrayClient::HandleUpdateAvailable() {
if (flash_update_available_)
severity = std::max(severity, ash::mojom::UpdateSeverity::LOW);
- system_tray_->ShowUpdateIcon(severity, detector->is_factory_reset_required());
+ // Show a string specific to updating flash player if there is no system
+ // update.
+ ash::mojom::UpdateType update_type = detector->notify_upgrade()
+ ? ash::mojom::UpdateType::SYSTEM
+ : ash::mojom::UpdateType::FLASH;
+
+ system_tray_->ShowUpdateIcon(severity, detector->is_factory_reset_required(),
+ update_type);
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « ash/system/update/tray_update_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698