OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // See net/disk_cache/disk_cache.h for the public interface of the cache. | 5 // See net/disk_cache/disk_cache.h for the public interface of the cache. |
6 | 6 |
7 #ifndef NET_DISK_CACHE_BACKEND_IMPL_H_ | 7 #ifndef NET_DISK_CACHE_BACKEND_IMPL_H_ |
8 #define NET_DISK_CACHE_BACKEND_IMPL_H_ | 8 #define NET_DISK_CACHE_BACKEND_IMPL_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 | 258 |
259 // Backend interface. | 259 // Backend interface. |
260 virtual int32 GetEntryCount() const OVERRIDE; | 260 virtual int32 GetEntryCount() const OVERRIDE; |
261 virtual int OpenEntry(const std::string& key, Entry** entry, | 261 virtual int OpenEntry(const std::string& key, Entry** entry, |
262 OldCompletionCallback* callback) OVERRIDE; | 262 OldCompletionCallback* callback) OVERRIDE; |
263 virtual int CreateEntry(const std::string& key, Entry** entry, | 263 virtual int CreateEntry(const std::string& key, Entry** entry, |
264 OldCompletionCallback* callback) OVERRIDE; | 264 OldCompletionCallback* callback) OVERRIDE; |
265 virtual int DoomEntry(const std::string& key, | 265 virtual int DoomEntry(const std::string& key, |
266 OldCompletionCallback* callback) OVERRIDE; | 266 OldCompletionCallback* callback) OVERRIDE; |
267 virtual int DoomAllEntries(OldCompletionCallback* callback) OVERRIDE; | 267 virtual int DoomAllEntries(OldCompletionCallback* callback) OVERRIDE; |
| 268 virtual int DoomAllEntries(const net::CompletionCallback& callback) OVERRIDE; |
268 virtual int DoomEntriesBetween(const base::Time initial_time, | 269 virtual int DoomEntriesBetween(const base::Time initial_time, |
269 const base::Time end_time, | 270 const base::Time end_time, |
270 OldCompletionCallback* callback) OVERRIDE; | 271 OldCompletionCallback* callback) OVERRIDE; |
| 272 virtual int DoomEntriesBetween( |
| 273 const base::Time initial_time, |
| 274 const base::Time end_time, |
| 275 const net::CompletionCallback& callback) OVERRIDE; |
271 virtual int DoomEntriesSince(const base::Time initial_time, | 276 virtual int DoomEntriesSince(const base::Time initial_time, |
272 OldCompletionCallback* callback) OVERRIDE; | 277 OldCompletionCallback* callback) OVERRIDE; |
273 virtual int OpenNextEntry(void** iter, Entry** next_entry, | 278 virtual int OpenNextEntry(void** iter, Entry** next_entry, |
274 OldCompletionCallback* callback) OVERRIDE; | 279 OldCompletionCallback* callback) OVERRIDE; |
275 virtual void EndEnumeration(void** iter) OVERRIDE; | 280 virtual void EndEnumeration(void** iter) OVERRIDE; |
276 virtual void GetStats(StatsItems* stats) OVERRIDE; | 281 virtual void GetStats(StatsItems* stats) OVERRIDE; |
277 virtual void OnExternalCacheHit(const std::string& key) OVERRIDE; | 282 virtual void OnExternalCacheHit(const std::string& key) OVERRIDE; |
278 | 283 |
279 private: | 284 private: |
280 typedef base::hash_map<CacheAddr, EntryImpl*> EntriesMap; | 285 typedef base::hash_map<CacheAddr, EntryImpl*> EntriesMap; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 | 395 |
391 DISALLOW_COPY_AND_ASSIGN(BackendImpl); | 396 DISALLOW_COPY_AND_ASSIGN(BackendImpl); |
392 }; | 397 }; |
393 | 398 |
394 // Returns the prefered max cache size given the available disk space. | 399 // Returns the prefered max cache size given the available disk space. |
395 NET_EXPORT_PRIVATE int PreferedCacheSize(int64 available); | 400 NET_EXPORT_PRIVATE int PreferedCacheSize(int64 available); |
396 | 401 |
397 } // namespace disk_cache | 402 } // namespace disk_cache |
398 | 403 |
399 #endif // NET_DISK_CACHE_BACKEND_IMPL_H_ | 404 #endif // NET_DISK_CACHE_BACKEND_IMPL_H_ |
OLD | NEW |