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

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: Only check for policy on CHROME_BUILD. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/upgrade_detector.h
diff --git a/chrome/browser/upgrade_detector.h b/chrome/browser/upgrade_detector.h
index c05f88ae287dab23fe0a9a5b928b08260da245e9..bdb353d5f1043daa5bf8adfdbe9c62d4ffefbfc2 100644
--- a/chrome/browser/upgrade_detector.h
+++ b/chrome/browser/upgrade_detector.h
@@ -52,6 +52,13 @@ class UpgradeDetector {
// 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 a outdated Chrome (no updates for too long).
Finnur 2013/01/30 15:50:48 nit: "... due to Chrome being outdated"
MAD 2013/01/31 21:31:42 Done.
+ bool is_outdated_install() const {
+ // Critical upgrade have precedence over outdated because it means we
+ // successfully installed a critical upgrade, so no need to reinstall.
+ return is_outdated_install_ && !is_critical_upgrade_;
Finnur 2013/01/30 15:50:48 The use of is_critical_upgrade_ here does not make
MAD 2013/01/31 21:31:42 The problem is that as soon as we identify is_outd
+ }
+
// Notifify this object that the user has acknowledged the critical update
// so we don't need to complain about it for now.
void acknowledge_critical_update() {
@@ -96,6 +103,10 @@ class UpgradeDetector {
// fix.
bool is_critical_upgrade_;
+ // True if no update to Chrome has been installed for more than the allowed
+ // time, which means updating keeps failing, so a reinstall can be suggested.
+ bool is_outdated_install_;
+
// 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 |is_critical_upgrade_| or
+ // |is_outdated_install_| is true.
base::RepeatingTimer<UpgradeDetector> idle_check_timer_;
// The stage at which the annoyance level for upgrade notifications is at.

Powered by Google App Engine
This is Rietveld 408576698