| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 critical_update_acknowledged_ = true; | 63 critical_update_acknowledged_ = true; |
| 64 } | 64 } |
| 65 | 65 |
| 66 // Whether the user has acknowledged the critical update. | 66 // Whether the user has acknowledged the critical update. |
| 67 bool critical_update_acknowledged() const { | 67 bool critical_update_acknowledged() const { |
| 68 return critical_update_acknowledged_; | 68 return critical_update_acknowledged_; |
| 69 } | 69 } |
| 70 | 70 |
| 71 bool is_factory_reset_required() const { return is_factory_reset_required_; } | 71 bool is_factory_reset_required() const { return is_factory_reset_required_; } |
| 72 | 72 |
| 73 // Retrieves the right icon ID based on the degree of severity (see | 73 // Retrieves the right icon based on the degree of severity (see |
| 74 // UpgradeNotificationAnnoyanceLevel, each level has an an accompanying icon | 74 // UpgradeNotificationAnnoyanceLevel, each level has an an accompanying icon |
| 75 // to go with it) to display within the app menu. | 75 // to go with it) to display within the app menu. |
| 76 int GetIconResourceID(); | 76 gfx::Image GetIcon(); |
| 77 | 77 |
| 78 UpgradeNotificationAnnoyanceLevel upgrade_notification_stage() const { | 78 UpgradeNotificationAnnoyanceLevel upgrade_notification_stage() const { |
| 79 return upgrade_notification_stage_; | 79 return upgrade_notification_stage_; |
| 80 } | 80 } |
| 81 | 81 |
| 82 protected: | 82 protected: |
| 83 enum UpgradeAvailable { | 83 enum UpgradeAvailable { |
| 84 // If no update is available and current install is recent enough. | 84 // If no update is available and current install is recent enough. |
| 85 UPGRADE_AVAILABLE_NONE, | 85 UPGRADE_AVAILABLE_NONE, |
| 86 // If a regular update is available. | 86 // If a regular update is available. |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 UpgradeNotificationAnnoyanceLevel upgrade_notification_stage_; | 171 UpgradeNotificationAnnoyanceLevel upgrade_notification_stage_; |
| 172 | 172 |
| 173 // Whether we have waited long enough after detecting an upgrade (to see | 173 // Whether we have waited long enough after detecting an upgrade (to see |
| 174 // is we should start nagging about upgrading). | 174 // is we should start nagging about upgrading). |
| 175 bool notify_upgrade_; | 175 bool notify_upgrade_; |
| 176 | 176 |
| 177 DISALLOW_COPY_AND_ASSIGN(UpgradeDetector); | 177 DISALLOW_COPY_AND_ASSIGN(UpgradeDetector); |
| 178 }; | 178 }; |
| 179 | 179 |
| 180 #endif // CHROME_BROWSER_UPGRADE_DETECTOR_H_ | 180 #endif // CHROME_BROWSER_UPGRADE_DETECTOR_H_ |
| OLD | NEW |