| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/toolbar/app_menu_icon_controller.h" | 5 #include "chrome/browser/ui/toolbar/app_menu_icon_controller.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/ui/global_error/global_error_service.h" | 10 #include "chrome/browser/ui/global_error/global_error_service.h" |
| 11 #include "chrome/browser/ui/global_error/global_error_service_factory.h" | 11 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
| 12 #include "chrome/browser/upgrade_detector.h" | 12 #include "chrome/browser/upgrade_detector.h" |
| 13 | 13 |
| 14 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
| 15 #include "base/win/windows_version.h" | 15 #include "base/win/windows_version.h" |
| 16 #include "chrome/browser/enumerate_modules_model_win.h" | 16 #include "chrome/browser/win/enumerate_modules_model.h" |
| 17 #endif | 17 #endif |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 // Maps an upgrade level to a severity level. | 21 // Maps an upgrade level to a severity level. |
| 22 AppMenuIconPainter::Severity SeverityFromUpgradeLevel( | 22 AppMenuIconPainter::Severity SeverityFromUpgradeLevel( |
| 23 UpgradeDetector::UpgradeNotificationAnnoyanceLevel level) { | 23 UpgradeDetector::UpgradeNotificationAnnoyanceLevel level) { |
| 24 switch (level) { | 24 switch (level) { |
| 25 case UpgradeDetector::UPGRADE_ANNOYANCE_NONE: | 25 case UpgradeDetector::UPGRADE_ANNOYANCE_NONE: |
| 26 return AppMenuIconPainter::SEVERITY_NONE; | 26 return AppMenuIconPainter::SEVERITY_NONE; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 122 |
| 123 delegate_->UpdateSeverity(IconType::NONE, | 123 delegate_->UpdateSeverity(IconType::NONE, |
| 124 AppMenuIconPainter::SEVERITY_NONE, true); | 124 AppMenuIconPainter::SEVERITY_NONE, true); |
| 125 } | 125 } |
| 126 void AppMenuIconController::Observe( | 126 void AppMenuIconController::Observe( |
| 127 int type, | 127 int type, |
| 128 const content::NotificationSource& source, | 128 const content::NotificationSource& source, |
| 129 const content::NotificationDetails& details) { | 129 const content::NotificationDetails& details) { |
| 130 UpdateDelegate(); | 130 UpdateDelegate(); |
| 131 } | 131 } |
| OLD | NEW |