| 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_EXTENSIONS_API_ALARMS_ALARM_MANAGER_H__ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_ALARMS_ALARM_MANAGER_H__ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_ALARMS_ALARM_MANAGER_H__ | 6 #define CHROME_BROWSER_EXTENSIONS_API_ALARMS_ALARM_MANAGER_H__ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 base::OneShotTimer<AlarmManager> timer_; | 208 base::OneShotTimer<AlarmManager> timer_; |
| 209 | 209 |
| 210 // A map of our pending alarms, per extension. | 210 // A map of our pending alarms, per extension. |
| 211 // Invariant: None of the AlarmLists are empty. | 211 // Invariant: None of the AlarmLists are empty. |
| 212 AlarmMap alarms_; | 212 AlarmMap alarms_; |
| 213 | 213 |
| 214 // A map of actions waiting for alarm data to be synced from storage, per | 214 // A map of actions waiting for alarm data to be synced from storage, per |
| 215 // extension. | 215 // extension. |
| 216 ReadyMap ready_actions_; | 216 ReadyMap ready_actions_; |
| 217 | 217 |
| 218 // The previous and next time that alarms were and will be run. | 218 // The previous time that alarms were run. |
| 219 base::Time last_poll_time_; | 219 base::Time last_poll_time_; |
| 220 base::Time next_poll_time_; | 220 |
| 221 // Next poll's time. Used only by unit tests. |
| 222 base::Time test_next_poll_time_; |
| 221 | 223 |
| 222 DISALLOW_COPY_AND_ASSIGN(AlarmManager); | 224 DISALLOW_COPY_AND_ASSIGN(AlarmManager); |
| 223 }; | 225 }; |
| 224 | 226 |
| 225 } // namespace extensions | 227 } // namespace extensions |
| 226 | 228 |
| 227 #endif // CHROME_BROWSER_EXTENSIONS_API_ALARMS_ALARM_MANAGER_H__ | 229 #endif // CHROME_BROWSER_EXTENSIONS_API_ALARMS_ALARM_MANAGER_H__ |
| OLD | NEW |