| 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 EXTENSIONS_BROWSER_API_ALARMS_ALARM_MANAGER_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_ALARMS_ALARM_MANAGER_H_ |
| 6 #define EXTENSIONS_BROWSER_API_ALARMS_ALARM_MANAGER_H_ | 6 #define EXTENSIONS_BROWSER_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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 friend class ExtensionAlarmsSchedulingTest; | 122 friend class ExtensionAlarmsSchedulingTest; |
| 123 FRIEND_TEST_ALL_PREFIXES(ExtensionAlarmsSchedulingTest, PollScheduling); | 123 FRIEND_TEST_ALL_PREFIXES(ExtensionAlarmsSchedulingTest, PollScheduling); |
| 124 FRIEND_TEST_ALL_PREFIXES(ExtensionAlarmsSchedulingTest, | 124 FRIEND_TEST_ALL_PREFIXES(ExtensionAlarmsSchedulingTest, |
| 125 ReleasedExtensionPollsInfrequently); | 125 ReleasedExtensionPollsInfrequently); |
| 126 FRIEND_TEST_ALL_PREFIXES(ExtensionAlarmsSchedulingTest, TimerRunning); | 126 FRIEND_TEST_ALL_PREFIXES(ExtensionAlarmsSchedulingTest, TimerRunning); |
| 127 FRIEND_TEST_ALL_PREFIXES(ExtensionAlarmsSchedulingTest, MinimumGranularity); | 127 FRIEND_TEST_ALL_PREFIXES(ExtensionAlarmsSchedulingTest, MinimumGranularity); |
| 128 FRIEND_TEST_ALL_PREFIXES(ExtensionAlarmsSchedulingTest, | 128 FRIEND_TEST_ALL_PREFIXES(ExtensionAlarmsSchedulingTest, |
| 129 DifferentMinimumGranularities); | 129 DifferentMinimumGranularities); |
| 130 FRIEND_TEST_ALL_PREFIXES(ExtensionAlarmsSchedulingTest, | 130 FRIEND_TEST_ALL_PREFIXES(ExtensionAlarmsSchedulingTest, |
| 131 RepeatingAlarmsScheduledPredictably); | 131 RepeatingAlarmsScheduledPredictably); |
| 132 FRIEND_TEST_ALL_PREFIXES(ExtensionAlarmsSchedulingTest, |
| 133 PollFrequencyFromStoredAlarm); |
| 132 friend class BrowserContextKeyedAPIFactory<AlarmManager>; | 134 friend class BrowserContextKeyedAPIFactory<AlarmManager>; |
| 133 | 135 |
| 134 typedef std::string ExtensionId; | 136 typedef std::string ExtensionId; |
| 135 typedef std::map<ExtensionId, AlarmList> AlarmMap; | 137 typedef std::map<ExtensionId, AlarmList> AlarmMap; |
| 136 | 138 |
| 137 typedef base::Callback<void(const std::string&)> ReadyAction; | 139 typedef base::Callback<void(const std::string&)> ReadyAction; |
| 138 typedef std::queue<ReadyAction> ReadyQueue; | 140 typedef std::queue<ReadyAction> ReadyQueue; |
| 139 typedef std::map<ExtensionId, ReadyQueue> ReadyMap; | 141 typedef std::map<ExtensionId, ReadyQueue> ReadyMap; |
| 140 | 142 |
| 141 // Iterator used to identify a particular alarm within the Map/List pair. | 143 // Iterator used to identify a particular alarm within the Map/List pair. |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 | 239 |
| 238 // Next poll's time. | 240 // Next poll's time. |
| 239 base::Time next_poll_time_; | 241 base::Time next_poll_time_; |
| 240 | 242 |
| 241 DISALLOW_COPY_AND_ASSIGN(AlarmManager); | 243 DISALLOW_COPY_AND_ASSIGN(AlarmManager); |
| 242 }; | 244 }; |
| 243 | 245 |
| 244 } // namespace extensions | 246 } // namespace extensions |
| 245 | 247 |
| 246 #endif // EXTENSIONS_BROWSER_API_ALARMS_ALARM_MANAGER_H_ | 248 #endif // EXTENSIONS_BROWSER_API_ALARMS_ALARM_MANAGER_H_ |
| OLD | NEW |