OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_SYSTEM_AUTOMATIC_REBOOT_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_AUTOMATIC_REBOOT_MANAGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_AUTOMATIC_REBOOT_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_AUTOMATIC_REBOOT_MANAGER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 base::TimeTicks update_reboot_needed_time; | 90 base::TimeTicks update_reboot_needed_time; |
91 }; | 91 }; |
92 | 92 |
93 explicit AutomaticRebootManager(scoped_ptr<base::TickClock> clock); | 93 explicit AutomaticRebootManager(scoped_ptr<base::TickClock> clock); |
94 virtual ~AutomaticRebootManager(); | 94 virtual ~AutomaticRebootManager(); |
95 | 95 |
96 void AddObserver(AutomaticRebootManagerObserver* observer); | 96 void AddObserver(AutomaticRebootManagerObserver* observer); |
97 void RemoveObserver(AutomaticRebootManagerObserver* observer); | 97 void RemoveObserver(AutomaticRebootManagerObserver* observer); |
98 | 98 |
99 // PowerManagerClient::Observer: | 99 // PowerManagerClient::Observer: |
100 virtual void SuspendDone(const base::TimeDelta& sleep_duration) OVERRIDE; | 100 virtual void SuspendDone(const base::TimeDelta& sleep_duration) override; |
101 | 101 |
102 // UpdateEngineClient::Observer: | 102 // UpdateEngineClient::Observer: |
103 virtual void UpdateStatusChanged( | 103 virtual void UpdateStatusChanged( |
104 const UpdateEngineClient::Status& status) OVERRIDE; | 104 const UpdateEngineClient::Status& status) override; |
105 | 105 |
106 // wm::UserActivityObserver: | 106 // wm::UserActivityObserver: |
107 virtual void OnUserActivity(const ui::Event* event) OVERRIDE; | 107 virtual void OnUserActivity(const ui::Event* event) override; |
108 | 108 |
109 // content::NotificationObserver: | 109 // content::NotificationObserver: |
110 virtual void Observe(int type, | 110 virtual void Observe(int type, |
111 const content::NotificationSource& source, | 111 const content::NotificationSource& source, |
112 const content::NotificationDetails& details) OVERRIDE; | 112 const content::NotificationDetails& details) override; |
113 | 113 |
114 static void RegisterPrefs(PrefRegistrySimple* registry); | 114 static void RegisterPrefs(PrefRegistrySimple* registry); |
115 | 115 |
116 private: | 116 private: |
117 friend class AutomaticRebootManagerBasicTest; | 117 friend class AutomaticRebootManagerBasicTest; |
118 | 118 |
119 // Finishes initialization. Called after the |system_event_times| have been | 119 // Finishes initialization. Called after the |system_event_times| have been |
120 // loaded in the blocking thread pool. | 120 // loaded in the blocking thread pool. |
121 void Init(const SystemEventTimes& system_event_times); | 121 void Init(const SystemEventTimes& system_event_times); |
122 | 122 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 168 |
169 base::WeakPtrFactory<AutomaticRebootManager> weak_ptr_factory_; | 169 base::WeakPtrFactory<AutomaticRebootManager> weak_ptr_factory_; |
170 | 170 |
171 DISALLOW_COPY_AND_ASSIGN(AutomaticRebootManager); | 171 DISALLOW_COPY_AND_ASSIGN(AutomaticRebootManager); |
172 }; | 172 }; |
173 | 173 |
174 } // namespace system | 174 } // namespace system |
175 } // namespace chromeos | 175 } // namespace chromeos |
176 | 176 |
177 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_AUTOMATIC_REBOOT_MANAGER_H_ | 177 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_AUTOMATIC_REBOOT_MANAGER_H_ |
OLD | NEW |