OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UPGRADE_DETECTOR_H_ | 5 #ifndef CHROME_BROWSER_UPGRADE_DETECTOR_H_ |
6 #define CHROME_BROWSER_UPGRADE_DETECTOR_H_ | 6 #define CHROME_BROWSER_UPGRADE_DETECTOR_H_ |
7 | 7 |
8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // If no update to Chrome has been installed for more than the recommended | 94 // If no update to Chrome has been installed for more than the recommended |
95 // time AND auto-update is turned off. | 95 // time AND auto-update is turned off. |
96 UPGRADE_NEEDED_OUTDATED_INSTALL_NO_AU, | 96 UPGRADE_NEEDED_OUTDATED_INSTALL_NO_AU, |
97 }; | 97 }; |
98 | 98 |
99 UpgradeDetector(); | 99 UpgradeDetector(); |
100 | 100 |
101 // Sends out UPGRADE_RECOMMENDED notification and set notify_upgrade_. | 101 // Sends out UPGRADE_RECOMMENDED notification and set notify_upgrade_. |
102 void NotifyUpgradeRecommended(); | 102 void NotifyUpgradeRecommended(); |
103 | 103 |
| 104 // The function that sends out a notification that lets the rest of the UI |
| 105 // know we should notify the user that a new update is available to download |
| 106 // over cellular connection. |
| 107 void NotifyUpdateOverCellularAvailable(); |
| 108 |
104 // Triggers a critical update, which starts a timer that checks the machine | 109 // Triggers a critical update, which starts a timer that checks the machine |
105 // idle state. Protected and virtual so that it could be overridden by tests. | 110 // idle state. Protected and virtual so that it could be overridden by tests. |
106 virtual void TriggerCriticalUpdate(); | 111 virtual void TriggerCriticalUpdate(); |
107 | 112 |
108 UpgradeAvailable upgrade_available() const { return upgrade_available_; } | 113 UpgradeAvailable upgrade_available() const { return upgrade_available_; } |
109 void set_upgrade_available(UpgradeAvailable available) { | 114 void set_upgrade_available(UpgradeAvailable available) { |
110 upgrade_available_ = available; | 115 upgrade_available_ = available; |
111 } | 116 } |
112 | 117 |
113 void set_best_effort_experiment_updates_available(bool available) { | 118 void set_best_effort_experiment_updates_available(bool available) { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 UpgradeNotificationAnnoyanceLevel upgrade_notification_stage_; | 177 UpgradeNotificationAnnoyanceLevel upgrade_notification_stage_; |
173 | 178 |
174 // Whether we have waited long enough after detecting an upgrade (to see | 179 // Whether we have waited long enough after detecting an upgrade (to see |
175 // is we should start nagging about upgrading). | 180 // is we should start nagging about upgrading). |
176 bool notify_upgrade_; | 181 bool notify_upgrade_; |
177 | 182 |
178 DISALLOW_COPY_AND_ASSIGN(UpgradeDetector); | 183 DISALLOW_COPY_AND_ASSIGN(UpgradeDetector); |
179 }; | 184 }; |
180 | 185 |
181 #endif // CHROME_BROWSER_UPGRADE_DETECTOR_H_ | 186 #endif // CHROME_BROWSER_UPGRADE_DETECTOR_H_ |
OLD | NEW |