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 NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ | 5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ |
6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ | 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 Entry** entry, | 98 Entry** entry, |
99 const CompletionCallback& callback) override; | 99 const CompletionCallback& callback) override; |
100 int DoomEntry(const std::string& key, | 100 int DoomEntry(const std::string& key, |
101 const CompletionCallback& callback) override; | 101 const CompletionCallback& callback) override; |
102 int DoomAllEntries(const CompletionCallback& callback) override; | 102 int DoomAllEntries(const CompletionCallback& callback) override; |
103 int DoomEntriesBetween(base::Time initial_time, | 103 int DoomEntriesBetween(base::Time initial_time, |
104 base::Time end_time, | 104 base::Time end_time, |
105 const CompletionCallback& callback) override; | 105 const CompletionCallback& callback) override; |
106 int DoomEntriesSince(base::Time initial_time, | 106 int DoomEntriesSince(base::Time initial_time, |
107 const CompletionCallback& callback) override; | 107 const CompletionCallback& callback) override; |
| 108 int CalculateSizeOfEntriesBetween( |
| 109 base::Time initial_time, |
| 110 base::Time end_time, |
| 111 const CompletionCallback& callback) override; |
108 scoped_ptr<Iterator> CreateIterator() override; | 112 scoped_ptr<Iterator> CreateIterator() override; |
109 void GetStats(base::StringPairs* stats) override; | 113 void GetStats(base::StringPairs* stats) override; |
110 void OnExternalCacheHit(const std::string& key) override; | 114 void OnExternalCacheHit(const std::string& key) override; |
111 | 115 |
112 private: | 116 private: |
113 class SimpleIterator; | 117 class SimpleIterator; |
114 friend class SimpleIterator; | 118 friend class SimpleIterator; |
115 | 119 |
116 typedef base::hash_map<uint64, SimpleEntryImpl*> EntryMap; | 120 typedef base::hash_map<uint64, SimpleEntryImpl*> EntryMap; |
117 | 121 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 // is complete. The base::Closure map target is used to store deferred | 207 // is complete. The base::Closure map target is used to store deferred |
204 // operations to be run at the completion of the Doom. | 208 // operations to be run at the completion of the Doom. |
205 base::hash_map<uint64, std::vector<base::Closure> > entries_pending_doom_; | 209 base::hash_map<uint64, std::vector<base::Closure> > entries_pending_doom_; |
206 | 210 |
207 net::NetLog* const net_log_; | 211 net::NetLog* const net_log_; |
208 }; | 212 }; |
209 | 213 |
210 } // namespace disk_cache | 214 } // namespace disk_cache |
211 | 215 |
212 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ | 216 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ |
OLD | NEW |