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

Unified Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 10915214: ash: Update system update notification behaviour. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | « ash/system/user/update_observer.h ('k') | chrome/browser/upgrade_detector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/system/ash_system_tray_delegate.cc
diff --git a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
index ddc03f4dbe034a0784807044f51231be7d6a97f9..dc9e08a5d29973d786f4438f7ef3cde2244fde43 100644
--- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
+++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
@@ -1012,9 +1012,31 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
const content::NotificationDetails& details) OVERRIDE {
switch (type) {
case chrome::NOTIFICATION_UPGRADE_RECOMMENDED: {
+ UpgradeDetector* detector =
+ content::Source<UpgradeDetector>(source).ptr();
+ ash::UpdateObserver::UpdateSeverity severity =
+ ash::UpdateObserver::UPDATE_NORMAL;
+ switch (detector->upgrade_notification_stage()) {
+ case UpgradeDetector::UPGRADE_ANNOYANCE_SEVERE:
+ severity = ash::UpdateObserver::UPDATE_SEVERE_RED;
+ break;
+
+ case UpgradeDetector::UPGRADE_ANNOYANCE_HIGH:
+ severity = ash::UpdateObserver::UPDATE_HIGH_ORANGE;
+ break;
+
+ case UpgradeDetector::UPGRADE_ANNOYANCE_ELEVATED:
+ severity = ash::UpdateObserver::UPDATE_LOW_GREEN;
+ break;
+
+ case UpgradeDetector::UPGRADE_ANNOYANCE_LOW:
+ default:
+ severity = ash::UpdateObserver::UPDATE_NORMAL;
+ break;
+ }
ash::UpdateObserver* observer = tray_->update_observer();
if (observer)
- observer->OnUpdateRecommended();
+ observer->OnUpdateRecommended(severity);
break;
}
case chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED: {
« no previous file with comments | « ash/system/user/update_observer.h ('k') | chrome/browser/upgrade_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698