| Index: chrome/browser/upgrade_detector.cc
|
| diff --git a/chrome/browser/upgrade_detector.cc b/chrome/browser/upgrade_detector.cc
|
| index ab3a4cfaeb7c2191aaa85668e56a9608f3674510..23db83d8f6c2b38bd064ebe6a57d3268ec0ee0e8 100644
|
| --- a/chrome/browser/upgrade_detector.cc
|
| +++ b/chrome/browser/upgrade_detector.cc
|
| @@ -14,6 +14,9 @@
|
| #include "components/prefs/pref_registry_simple.h"
|
| #include "content/public/browser/notification_service.h"
|
| #include "grit/theme_resources.h"
|
| +#include "ui/gfx/color_palette.h"
|
| +#include "ui/gfx/paint_vector_icon.h"
|
| +#include "ui/gfx/vector_icons_public.h"
|
|
|
| // How long to wait between checks for whether the user has been idle.
|
| static const int kIdleRepeatingTimerWait = 10; // Minutes (seconds if testing).
|
| @@ -36,23 +39,27 @@ void UpgradeDetector::RegisterPrefs(PrefRegistrySimple* registry) {
|
| registry->RegisterBooleanPref(prefs::kAttemptedToEnableAutoupdate, false);
|
| }
|
|
|
| -int UpgradeDetector::GetIconResourceID() {
|
| +gfx::Image UpgradeDetector::GetIcon() {
|
| + SkColor color = gfx::kPlaceholderColor;
|
| switch (upgrade_notification_stage_) {
|
| case UPGRADE_ANNOYANCE_NONE:
|
| - return 0;
|
| + return gfx::Image();
|
| case UPGRADE_ANNOYANCE_LOW:
|
| - return IDR_UPDATE_MENU_SEVERITY_LOW;
|
| + color = gfx::kGoogleGreen700;
|
| + break;
|
| case UPGRADE_ANNOYANCE_ELEVATED:
|
| - return IDR_UPDATE_MENU_SEVERITY_MEDIUM;
|
| + color = gfx::kGoogleYellow700;
|
| + break;
|
| case UPGRADE_ANNOYANCE_HIGH:
|
| - return IDR_UPDATE_MENU_SEVERITY_HIGH;
|
| case UPGRADE_ANNOYANCE_SEVERE:
|
| - return IDR_UPDATE_MENU_SEVERITY_HIGH;
|
| case UPGRADE_ANNOYANCE_CRITICAL:
|
| - return IDR_UPDATE_MENU_SEVERITY_HIGH;
|
| + color = gfx::kGoogleRed700;
|
| + break;
|
| }
|
| - NOTREACHED();
|
| - return 0;
|
| + DCHECK_NE(gfx::kPlaceholderColor, color);
|
| +
|
| + return gfx::Image(
|
| + gfx::CreateVectorIcon(gfx::VectorIconId::UPGRADE_MENU_ITEM, 16, color));
|
| }
|
|
|
| UpgradeDetector::UpgradeDetector()
|
|
|