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

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

Issue 614363002: Added Aura notification that relaunch and powerwash is required in case of downgrade. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactoring of SystemTrayDelegate(Windows|Linux) is delayed. Created 6 years, 2 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
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 826785c0d457646ba53d7c61efbd7f76eab55d28..37d5593a479ebcbdb9b22a057a13cc7ccae0482f 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,8 @@ 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 {
+ GetUpdateInfo(UpgradeDetector::GetInstance(), info);
}
virtual base::HourClockType GetHourClockType() const override {
@@ -302,27 +303,9 @@ 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;
+ GetUpdateInfo(content::Source<UpgradeDetector>(source).ptr(), &info);
+ GetSystemTrayNotifier()->NotifyUpdateRecommended(info);
} else {
NOTREACHED();
}
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos.cc ('k') | chrome/browser/ui/ash/system_tray_delegate_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698