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

Unified Diff: chrome/browser/upgrade_detector.h

Issue 11440020: Add an outdated upgrade bubble view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed OWNERS comments... Created 7 years, 10 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
« no previous file with comments | « chrome/browser/ui/views/toolbar_view.cc ('k') | chrome/browser/upgrade_detector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/upgrade_detector.h
diff --git a/chrome/browser/upgrade_detector.h b/chrome/browser/upgrade_detector.h
index 4f3f107143adb3fbffc2645e815ac133eb8a0785..86f2c442babf82150a550d1af5d9d01c08b21f08 100644
--- a/chrome/browser/upgrade_detector.h
+++ b/chrome/browser/upgrade_detector.h
@@ -49,8 +49,10 @@ class UpgradeDetector {
// Whether the user should be notified about an upgrade.
bool notify_upgrade() const { return notify_upgrade_; }
- // Whether the upgrade is a critical upgrade (such as a zero-day update).
- bool is_critical_update() const { return is_critical_upgrade_; }
+ // Whether the upgrade recommendation is due to Chrome being outdated.
+ bool is_outdated_install() const {
+ return upgrade_available_ == UPGRADE_NEEDED_OUTDATED_INSTALL;
+ }
// Notifify this object that the user has acknowledged the critical update
// so we don't need to complain about it for now.
@@ -92,9 +94,18 @@ class UpgradeDetector {
upgrade_notification_stage_ = stage;
}
- // True if a critical update to Chrome has been installed, such as a zero-day
- // fix.
- bool is_critical_upgrade_;
+ enum UpgradeAvailable {
+ // If no update is available and current install is recent enough.
+ UPGRADE_AVAILABLE_NONE,
+ // If a regular update is available.
+ UPGRADE_AVAILABLE_REGULAR,
+ // If a critical update to Chrome has been installed, such as a zero-day
+ // fix.
+ UPGRADE_AVAILABLE_CRITICAL,
+ // If no update to Chrome has been installed for more than the recommended
+ // time.
+ UPGRADE_NEEDED_OUTDATED_INSTALL,
+ } upgrade_available_;
// Whether the user has acknowledged the critical update.
bool critical_update_acknowledged_;
@@ -111,7 +122,8 @@ class UpgradeDetector {
base::Time upgrade_detected_time_;
// A timer to check to see if we've been idle for long enough to show the
- // critical warning. Should only be set if |is_critical_upgrade_| is true.
+ // critical warning. Should only be set if |upgrade_available_| is
+ // UPGRADE_AVAILABLE_CRITICAL.
base::RepeatingTimer<UpgradeDetector> idle_check_timer_;
// The stage at which the annoyance level for upgrade notifications is at.
« no previous file with comments | « chrome/browser/ui/views/toolbar_view.cc ('k') | chrome/browser/upgrade_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698