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

Unified Diff: chrome/browser/upgrade_detector.cc

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/upgrade_detector.h ('k') | chrome/browser/upgrade_detector_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/upgrade_detector.cc
diff --git a/chrome/browser/upgrade_detector.cc b/chrome/browser/upgrade_detector.cc
index 6f172f199d37793aa5f7aa1fba6d58af9a6c9a97..7ab27e1848a2be54814fc0c6249b65c71049c4f8 100644
--- a/chrome/browser/upgrade_detector.cc
+++ b/chrome/browser/upgrade_detector.cc
@@ -61,7 +61,7 @@ int UpgradeDetector::GetIconResourceID(UpgradeNotificationIconType type) {
}
UpgradeDetector::UpgradeDetector()
- : is_critical_upgrade_(false),
+ : upgrade_available_(UPGRADE_AVAILABLE_NONE),
critical_update_acknowledged_(false),
upgrade_notification_stage_(UPGRADE_ANNOYANCE_NONE),
notify_upgrade_(false) {
@@ -83,13 +83,25 @@ void UpgradeDetector::NotifyUpgradeRecommended() {
content::Source<UpgradeDetector>(this),
content::NotificationService::NoDetails());
- if (is_critical_upgrade_) {
- int idle_timer = UseTestingIntervals() ?
- kIdleRepeatingTimerWait :
- kIdleRepeatingTimerWait * 60; // To minutes.
- idle_check_timer_.Start(FROM_HERE,
- base::TimeDelta::FromSeconds(idle_timer),
- this, &UpgradeDetector::CheckIdle);
+ switch (upgrade_available_) {
+ case UPGRADE_NEEDED_OUTDATED_INSTALL: {
+ content::NotificationService::current()->Notify(
+ chrome::NOTIFICATION_OUTDATED_INSTALL,
+ content::Source<UpgradeDetector>(this),
+ content::NotificationService::NoDetails());
+ break;
+ }
+ case UPGRADE_AVAILABLE_CRITICAL: {
+ int idle_timer = UseTestingIntervals() ?
+ kIdleRepeatingTimerWait :
+ kIdleRepeatingTimerWait * 60; // To minutes.
+ idle_check_timer_.Start(FROM_HERE,
+ base::TimeDelta::FromSeconds(idle_timer),
+ this, &UpgradeDetector::CheckIdle);
+ break;
+ }
+ default:
+ break;
}
}
« no previous file with comments | « chrome/browser/upgrade_detector.h ('k') | chrome/browser/upgrade_detector_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698