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

Side by Side Diff: chrome/browser/upgrade_detector.cc

Issue 2614333002: Revert of Create vector icon resource directory specific to Chrome. (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_view.cc ('k') | ui/gfx/vector_icons/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/upgrade_detector.h" 5 #include "chrome/browser/upgrade_detector.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/app/vector_icons/vector_icons.h"
10 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
11 #include "chrome/browser/lifetime/application_lifetime.h" 10 #include "chrome/browser/lifetime/application_lifetime.h"
12 #include "chrome/browser/ui/browser_otr_state.h" 11 #include "chrome/browser/ui/browser_otr_state.h"
13 #include "chrome/common/chrome_switches.h" 12 #include "chrome/common/chrome_switches.h"
14 #include "chrome/common/pref_names.h" 13 #include "chrome/common/pref_names.h"
15 #include "components/prefs/pref_registry_simple.h" 14 #include "components/prefs/pref_registry_simple.h"
16 #include "content/public/browser/notification_service.h" 15 #include "content/public/browser/notification_service.h"
17 #include "ui/gfx/color_palette.h" 16 #include "ui/gfx/color_palette.h"
18 #include "ui/gfx/paint_vector_icon.h" 17 #include "ui/gfx/paint_vector_icon.h"
18 #include "ui/gfx/vector_icons_public.h"
19 19
20 // How long to wait between checks for whether the user has been idle. 20 // How long to wait between checks for whether the user has been idle.
21 static const int kIdleRepeatingTimerWait = 10; // Minutes (seconds if testing). 21 static const int kIdleRepeatingTimerWait = 10; // Minutes (seconds if testing).
22 22
23 // How much idle time (since last input even was detected) must have passed 23 // How much idle time (since last input even was detected) must have passed
24 // until we notify that a critical update has occurred. 24 // until we notify that a critical update has occurred.
25 static const int kIdleAmount = 2; // Hours (or seconds, if testing). 25 static const int kIdleAmount = 2; // Hours (or seconds, if testing).
26 26
27 bool UseTestingIntervals() { 27 bool UseTestingIntervals() {
28 // If a command line parameter specifying how long the upgrade check should 28 // If a command line parameter specifying how long the upgrade check should
(...skipping 21 matching lines...) Expand all
50 color = gfx::kGoogleYellow700; 50 color = gfx::kGoogleYellow700;
51 break; 51 break;
52 case UPGRADE_ANNOYANCE_HIGH: 52 case UPGRADE_ANNOYANCE_HIGH:
53 case UPGRADE_ANNOYANCE_SEVERE: 53 case UPGRADE_ANNOYANCE_SEVERE:
54 case UPGRADE_ANNOYANCE_CRITICAL: 54 case UPGRADE_ANNOYANCE_CRITICAL:
55 color = gfx::kGoogleRed700; 55 color = gfx::kGoogleRed700;
56 break; 56 break;
57 } 57 }
58 DCHECK_NE(gfx::kPlaceholderColor, color); 58 DCHECK_NE(gfx::kPlaceholderColor, color);
59 59
60 return gfx::Image(gfx::CreateVectorIcon(kBrowserToolsUpdateIcon, color)); 60 return gfx::Image(
61 gfx::CreateVectorIcon(gfx::VectorIconId::BROWSER_TOOLS_UPDATE, color));
61 } 62 }
62 63
63 UpgradeDetector::UpgradeDetector() 64 UpgradeDetector::UpgradeDetector()
64 : upgrade_available_(UPGRADE_AVAILABLE_NONE), 65 : upgrade_available_(UPGRADE_AVAILABLE_NONE),
65 best_effort_experiment_updates_available_(false), 66 best_effort_experiment_updates_available_(false),
66 critical_experiment_updates_available_(false), 67 critical_experiment_updates_available_(false),
67 critical_update_acknowledged_(false), 68 critical_update_acknowledged_(false),
68 is_factory_reset_required_(false), 69 is_factory_reset_required_(false),
69 upgrade_notification_stage_(UPGRADE_ANNOYANCE_NONE), 70 upgrade_notification_stage_(UPGRADE_ANNOYANCE_NONE),
70 notify_upgrade_(false) { 71 notify_upgrade_(false) {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 break; 132 break;
132 case ui::IDLE_STATE_ACTIVE: 133 case ui::IDLE_STATE_ACTIVE:
133 case ui::IDLE_STATE_UNKNOWN: 134 case ui::IDLE_STATE_UNKNOWN:
134 break; 135 break;
135 default: 136 default:
136 NOTREACHED(); // Need to add any new value above (either providing 137 NOTREACHED(); // Need to add any new value above (either providing
137 // automatic restart or show notification to user). 138 // automatic restart or show notification to user).
138 break; 139 break;
139 } 140 }
140 } 141 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_view.cc ('k') | ui/gfx/vector_icons/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698