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

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

Issue 2568413002: Revert of ash: Use system tray mojo interface to show system update tray icon (Closed)
Patch Set: Created 4 years 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 | « chrome/browser/ui/ash/system_tray_delegate_utils.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/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..470dc685b406468461df2d45ec1f9eb001a6a533
--- /dev/null
+++ b/chrome/browser/ui/ash/system_tray_delegate_utils.cc
@@ -0,0 +1,36 @@
+// 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/common/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:
+ info->severity = ash::UpdateInfo::UPDATE_CRITICAL;
+ break;
+ case UpgradeDetector::UPGRADE_ANNOYANCE_SEVERE:
+ info->severity = ash::UpdateInfo::UPDATE_SEVERE;
+ break;
+ case UpgradeDetector::UPGRADE_ANNOYANCE_HIGH:
+ info->severity = ash::UpdateInfo::UPDATE_HIGH;
+ break;
+ case UpgradeDetector::UPGRADE_ANNOYANCE_ELEVATED:
+ info->severity = ash::UpdateInfo::UPDATE_ELEVATED;
+ break;
+ case UpgradeDetector::UPGRADE_ANNOYANCE_LOW:
+ info->severity = ash::UpdateInfo::UPDATE_LOW;
+ break;
+ case UpgradeDetector::UPGRADE_ANNOYANCE_NONE:
+ info->severity = ash::UpdateInfo::UPDATE_NONE;
+ 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/upgrade_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698