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

Unified Diff: chrome/browser/ui/ash/system_tray_delegate_utils.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_utils.cc
diff --git a/chrome/browser/ui/ash/system_tray_delegate_utils.cc b/chrome/browser/ui/ash/system_tray_delegate_utils.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2404b5207e72171f72a844ad273d1282cb4ade7d
--- /dev/null
+++ b/chrome/browser/ui/ash/system_tray_delegate_utils.cc
@@ -0,0 +1,32 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/ash/system_tray_delegate_utils.h"
+
+#include "ash/system/tray/system_tray_delegate.h"
+#include "base/logging.h"
+#include "chrome/browser/upgrade_detector.h"
+
+void GetUpdateInfo(const UpgradeDetector* detector, ash::UpdateInfo* info) {
+ DCHECK(detector);
+ DCHECK(info);
+ switch (detector->upgrade_notification_stage()) {
+ case UpgradeDetector::UPGRADE_ANNOYANCE_CRITICAL:
+ case UpgradeDetector::UPGRADE_ANNOYANCE_SEVERE:
+ info->severity = ash::UpdateInfo::UPDATE_SEVERE_RED;
+ break;
+ case UpgradeDetector::UPGRADE_ANNOYANCE_HIGH:
+ info->severity = ash::UpdateInfo::UPDATE_HIGH_ORANGE;
+ break;
+ case UpgradeDetector::UPGRADE_ANNOYANCE_ELEVATED:
+ info->severity = ash::UpdateInfo::UPDATE_LOW_GREEN;
+ break;
+ case UpgradeDetector::UPGRADE_ANNOYANCE_LOW:
+ case UpgradeDetector::UPGRADE_ANNOYANCE_NONE:
+ info->severity = ash::UpdateInfo::UPDATE_NORMAL;
+ break;
+ }
+ info->update_required = detector->notify_upgrade();
+ info->factory_reset_required = detector->is_factory_reset_required();
+}
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_utils.h ('k') | chrome/browser/ui/ash/system_tray_delegate_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698