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

Side by Side Diff: storage/browser/quota/storage_monitor.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, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 STORAGE_BROWSER_QUOTA_STORAGE_MONITOR_H_ 5 #ifndef STORAGE_BROWSER_QUOTA_STORAGE_MONITOR_H_
6 #define STORAGE_BROWSER_QUOTA_STORAGE_MONITOR_H_ 6 #define STORAGE_BROWSER_QUOTA_STORAGE_MONITOR_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 base::TimeDelta rate; 53 base::TimeDelta rate;
54 bool requires_update; 54 bool requires_update;
55 55
56 ObserverState(); 56 ObserverState();
57 }; 57 };
58 typedef std::map<StorageObserver*, ObserverState> StorageObserverStateMap; 58 typedef std::map<StorageObserver*, ObserverState> StorageObserverStateMap;
59 59
60 void DispatchPendingEvent(); 60 void DispatchPendingEvent();
61 61
62 StorageObserverStateMap observers_; 62 StorageObserverStateMap observers_;
63 base::OneShotTimer<StorageObserverList> notification_timer_; 63 base::OneShotTimer notification_timer_;
64 StorageObserver::Event pending_event_; 64 StorageObserver::Event pending_event_;
65 65
66 friend class content::StorageMonitorTestBase; 66 friend class content::StorageMonitorTestBase;
67 67
68 DISALLOW_COPY_AND_ASSIGN(StorageObserverList); 68 DISALLOW_COPY_AND_ASSIGN(StorageObserverList);
69 }; 69 };
70 70
71 71
72 // Manages the storage observers of a common host. Caches the usage and quota of 72 // Manages the storage observers of a common host. Caches the usage and quota of
73 // the host to avoid accumulating for every change. 73 // the host to avoid accumulating for every change.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 QuotaManager* quota_manager_; 172 QuotaManager* quota_manager_;
173 StorageTypeObserversMap storage_type_observers_map_; 173 StorageTypeObserversMap storage_type_observers_map_;
174 174
175 DISALLOW_COPY_AND_ASSIGN(StorageMonitor); 175 DISALLOW_COPY_AND_ASSIGN(StorageMonitor);
176 }; 176 };
177 177
178 } // namespace storage 178 } // namespace storage
179 179
180 #endif // STORAGE_BROWSER_QUOTA_STORAGE_MONITOR_H_ 180 #endif // STORAGE_BROWSER_QUOTA_STORAGE_MONITOR_H_
OLDNEW
« no previous file with comments | « storage/browser/quota/quota_temporary_storage_evictor.h ('k') | sync/engine/sync_scheduler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698