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 // 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 | 9 |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 void TrimDeletedListForTest(bool empty); | 253 void TrimDeletedListForTest(bool empty); |
254 | 254 |
255 // Performs a simple self-check, and returns the number of dirty items | 255 // Performs a simple self-check, and returns the number of dirty items |
256 // or an error code (negative value). | 256 // or an error code (negative value). |
257 int SelfCheck(); | 257 int SelfCheck(); |
258 | 258 |
259 // Ensures the index is flushed to disk (a no-op on platforms with mmap). | 259 // Ensures the index is flushed to disk (a no-op on platforms with mmap). |
260 void FlushIndex(); | 260 void FlushIndex(); |
261 | 261 |
262 // Backend implementation. | 262 // Backend implementation. |
| 263 virtual net::CacheType GetCacheType() const OVERRIDE; |
263 virtual int32 GetEntryCount() const OVERRIDE; | 264 virtual int32 GetEntryCount() const OVERRIDE; |
264 virtual int OpenEntry(const std::string& key, Entry** entry, | 265 virtual int OpenEntry(const std::string& key, Entry** entry, |
265 const CompletionCallback& callback) OVERRIDE; | 266 const CompletionCallback& callback) OVERRIDE; |
266 virtual int CreateEntry(const std::string& key, Entry** entry, | 267 virtual int CreateEntry(const std::string& key, Entry** entry, |
267 const CompletionCallback& callback) OVERRIDE; | 268 const CompletionCallback& callback) OVERRIDE; |
268 virtual int DoomEntry(const std::string& key, | 269 virtual int DoomEntry(const std::string& key, |
269 const CompletionCallback& callback) OVERRIDE; | 270 const CompletionCallback& callback) OVERRIDE; |
270 virtual int DoomAllEntries(const CompletionCallback& callback) OVERRIDE; | 271 virtual int DoomAllEntries(const CompletionCallback& callback) OVERRIDE; |
271 virtual int DoomEntriesBetween(const base::Time initial_time, | 272 virtual int DoomEntriesBetween(const base::Time initial_time, |
272 const base::Time end_time, | 273 const base::Time end_time, |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 | 394 |
394 DISALLOW_COPY_AND_ASSIGN(BackendImpl); | 395 DISALLOW_COPY_AND_ASSIGN(BackendImpl); |
395 }; | 396 }; |
396 | 397 |
397 // Returns the preferred max cache size given the available disk space. | 398 // Returns the preferred max cache size given the available disk space. |
398 NET_EXPORT_PRIVATE int PreferedCacheSize(int64 available); | 399 NET_EXPORT_PRIVATE int PreferedCacheSize(int64 available); |
399 | 400 |
400 } // namespace disk_cache | 401 } // namespace disk_cache |
401 | 402 |
402 #endif // NET_DISK_CACHE_BACKEND_IMPL_H_ | 403 #endif // NET_DISK_CACHE_BACKEND_IMPL_H_ |
OLD | NEW |