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

Unified Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.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_chromeos.cc
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
index 2d5e39f57bd3c8e410f65eadc322c8e86da473f5..44856326681b1967365d114fdaa143bbe76b4ff1 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -71,6 +71,7 @@
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
+#include "chrome/browser/ui/ash/system_tray_delegate_utils.h"
#include "chrome/browser/ui/ash/user_accounts_delegate_chromeos.h"
#include "chrome/browser/ui/ash/volume_controller_chromeos.h"
#include "chrome/browser/ui/browser.h"
@@ -406,8 +407,9 @@ bool SystemTrayDelegateChromeOS::IsUserSupervised() const {
return user && user->IsSupervised();
}
-bool SystemTrayDelegateChromeOS::SystemShouldUpgrade() const {
- return UpgradeDetector::GetInstance()->notify_upgrade();
+void SystemTrayDelegateChromeOS::GetSystemUpdateInfo(
+ ash::UpdateInfo* info) const {
+ GetUpdateInfo(UpgradeDetector::GetInstance(), info);
}
base::HourClockType SystemTrayDelegateChromeOS::GetHourClockType() const {
@@ -1087,29 +1089,9 @@ void SystemTrayDelegateChromeOS::Observe(
const content::NotificationDetails& details) {
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;
- }
- GetSystemTrayNotifier()->NotifyUpdateRecommended(severity);
+ ash::UpdateInfo info;
+ GetUpdateInfo(content::Source<UpgradeDetector>(source).ptr(), &info);
+ GetSystemTrayNotifier()->NotifyUpdateRecommended(info);
break;
}
case chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED: {
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos.h ('k') | chrome/browser/ui/ash/system_tray_delegate_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698