Index: chrome/browser/upgrade_detector.h |
diff --git a/chrome/browser/upgrade_detector.h b/chrome/browser/upgrade_detector.h |
index c05f88ae287dab23fe0a9a5b928b08260da245e9..ef56158ba4f904f6119ca3c19952f45b303684d8 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 is due to Chrome being outdated. |
Finnur
2013/02/01 17:09:15
nit: I would probably inject the word 'recommendat
MAD
2013/02/02 03:55:34
Done.
|
+ bool IsOutdatedInstall() const { |
Finnur
2013/02/01 17:09:15
But... this function is still simple, no? Why chan
MAD
2013/02/02 03:55:34
Done.
I thought it was only for accessors, i.e., g
|
+ return upgrade_required_ == UPGRADE_REQUIRED_OUTDATED; |
+ } |
// 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,17 @@ 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 UpgradeRequired { |
Finnur
2013/02/01 17:09:15
nit: Required is a bit of a strong word. We only r
MAD
2013/02/02 03:55:34
Done.
|
+ // If no update is available and current install is recent enough. |
+ UPGRADE_REQUIRED_NONE, |
+ // If a regular update is available. |
+ UPGRADE_REQUIRED_REGULAR, |
+ // If a critical update to Chrome has been installed, such as a zero-day |
+ // fix. |
+ UPGRADE_REQUIRED_CRITICAL, |
+ // If no update to Chrome has been installed for more than the allowed time. |
Finnur
2013/02/01 17:09:15
nit: s/allowed/recommended/
MAD
2013/02/02 03:55:34
Done.
|
+ UPGRADE_REQUIRED_OUTDATED, |
+ } upgrade_required_; |
// Whether the user has acknowledged the critical update. |
bool critical_update_acknowledged_; |
@@ -111,7 +121,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_required_| is |
+ // UPGRADE_REQUIRED_CRITICAL. |
base::RepeatingTimer<UpgradeDetector> idle_check_timer_; |
// The stage at which the annoyance level for upgrade notifications is at. |