Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: extensions/browser/api/alarms/alarm_manager.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 content::BrowserContext* const browser_context_; 214 content::BrowserContext* const browser_context_;
215 scoped_ptr<base::Clock> clock_; 215 scoped_ptr<base::Clock> clock_;
216 scoped_ptr<Delegate> delegate_; 216 scoped_ptr<Delegate> delegate_;
217 217
218 // Listen to extension load notifications. 218 // Listen to extension load notifications.
219 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> 219 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
220 extension_registry_observer_; 220 extension_registry_observer_;
221 221
222 // The timer for this alarm manager. 222 // The timer for this alarm manager.
223 base::OneShotTimer<AlarmManager> timer_; 223 base::OneShotTimer timer_;
224 224
225 // A map of our pending alarms, per extension. 225 // A map of our pending alarms, per extension.
226 // Invariant: None of the AlarmLists are empty. 226 // Invariant: None of the AlarmLists are empty.
227 AlarmMap alarms_; 227 AlarmMap alarms_;
228 228
229 // A map of actions waiting for alarm data to be synced from storage, per 229 // A map of actions waiting for alarm data to be synced from storage, per
230 // extension. 230 // extension.
231 ReadyMap ready_actions_; 231 ReadyMap ready_actions_;
232 232
233 // The previous time that alarms were run. 233 // The previous time that alarms were run.
234 base::Time last_poll_time_; 234 base::Time last_poll_time_;
235 235
236 // Next poll's time. 236 // Next poll's time.
237 base::Time next_poll_time_; 237 base::Time next_poll_time_;
238 238
239 DISALLOW_COPY_AND_ASSIGN(AlarmManager); 239 DISALLOW_COPY_AND_ASSIGN(AlarmManager);
240 }; 240 };
241 241
242 } // namespace extensions 242 } // namespace extensions
243 243
244 #endif // EXTENSIONS_BROWSER_API_ALARMS_ALARM_MANAGER_H_ 244 #endif // EXTENSIONS_BROWSER_API_ALARMS_ALARM_MANAGER_H_
OLDNEW
« no previous file with comments | « content/renderer/resource_fetcher_browsertest.cc ('k') | extensions/browser/api/cast_channel/cast_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698