OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CHROMEOS_UPGRADE_DETECTOR_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_UPGRADE_DETECTOR_CHROMEOS_H_ |
6 #define CHROME_BROWSER_CHROMEOS_UPGRADE_DETECTOR_CHROMEOS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_UPGRADE_DETECTOR_CHROMEOS_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // The function that sends out a notification (after a certain time has | 44 // The function that sends out a notification (after a certain time has |
45 // elapsed) that lets the rest of the UI know we should start notifying the | 45 // elapsed) that lets the rest of the UI know we should start notifying the |
46 // user that a new version is available. | 46 // user that a new version is available. |
47 void NotifyOnUpgrade(); | 47 void NotifyOnUpgrade(); |
48 | 48 |
49 void OnChannelsReceived(const std::string& current_channel, | 49 void OnChannelsReceived(const std::string& current_channel, |
50 const std::string& target_channel); | 50 const std::string& target_channel); |
51 | 51 |
52 // After we detect an upgrade we start a recurring timer to see if enough time | 52 // After we detect an upgrade we start a recurring timer to see if enough time |
53 // has passed and we should start notifying the user. | 53 // has passed and we should start notifying the user. |
54 base::RepeatingTimer<UpgradeDetectorChromeos> upgrade_notification_timer_; | 54 base::RepeatingTimer upgrade_notification_timer_; |
55 bool initialized_; | 55 bool initialized_; |
56 base::Time upgrade_detected_time_; | 56 base::Time upgrade_detected_time_; |
57 | 57 |
58 scoped_ptr<ChannelsRequester> channels_requester_; | 58 scoped_ptr<ChannelsRequester> channels_requester_; |
59 | 59 |
60 base::WeakPtrFactory<UpgradeDetectorChromeos> weak_factory_; | 60 base::WeakPtrFactory<UpgradeDetectorChromeos> weak_factory_; |
61 | 61 |
62 DISALLOW_COPY_AND_ASSIGN(UpgradeDetectorChromeos); | 62 DISALLOW_COPY_AND_ASSIGN(UpgradeDetectorChromeos); |
63 }; | 63 }; |
64 | 64 |
65 #endif // CHROME_BROWSER_CHROMEOS_UPGRADE_DETECTOR_CHROMEOS_H_ | 65 #endif // CHROME_BROWSER_CHROMEOS_UPGRADE_DETECTOR_CHROMEOS_H_ |
OLD | NEW |