Index: chrome/browser/ui/ash/system_tray_delegate_linux.cc |
diff --git a/chrome/browser/ui/ash/system_tray_delegate_linux.cc b/chrome/browser/ui/ash/system_tray_delegate_linux.cc |
index 8c3ee83462e3772af45b6b25bf88841d331a222e..bd0aee87f99bacb17fd1e02b91a155807dc94e3b 100644 |
--- a/chrome/browser/ui/ash/system_tray_delegate_linux.cc |
+++ b/chrome/browser/ui/ash/system_tray_delegate_linux.cc |
@@ -16,6 +16,7 @@ |
#include "chrome/browser/chrome_notification_types.h" |
#include "chrome/browser/lifetime/application_lifetime.h" |
#include "chrome/browser/profiles/profile_manager.h" |
+#include "chrome/browser/ui/ash/system_tray_delegate_utils.h" |
#include "chrome/browser/ui/chrome_pages.h" |
#include "chrome/browser/ui/host_desktop.h" |
#include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" |
@@ -87,8 +88,9 @@ class SystemTrayDelegateLinux : public ash::SystemTrayDelegate, |
return false; |
} |
- virtual bool SystemShouldUpgrade() const OVERRIDE { |
- return UpgradeDetector::GetInstance()->notify_upgrade(); |
+ virtual void GetSystemUpdateInfo(ash::UpdateInfo* info) const OVERRIDE { |
+ system_tray_delegate_utils::GetUpdateInfo(UpgradeDetector::GetInstance(), |
+ info); |
} |
virtual base::HourClockType GetHourClockType() const OVERRIDE { |
@@ -302,27 +304,10 @@ class SystemTrayDelegateLinux : public ash::SystemTrayDelegate, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) OVERRIDE { |
if (type == 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_CRITICAL: |
- 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: |
- case UpgradeDetector::UPGRADE_ANNOYANCE_NONE: |
- severity = ash::UpdateObserver::UPDATE_NORMAL; |
- break; |
- } |
- GetSystemTrayNotifier()->NotifyUpdateRecommended(severity); |
+ ash::UpdateInfo info; |
+ system_tray_delegate_utils::GetUpdateInfo( |
+ content::Source<UpgradeDetector>(source).ptr(), &info); |
+ GetSystemTrayNotifier()->NotifyUpdateRecommended(info); |
} else { |
NOTREACHED(); |
} |