| 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_BLOCKFILE_BACKEND_IMPL_V3_H_ | 7 #ifndef NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_V3_H_ |
| 8 #define NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_V3_H_ | 8 #define NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_V3_H_ |
| 9 | 9 |
| 10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 virtual int CreateEntry(const std::string& key, Entry** entry, | 179 virtual int CreateEntry(const std::string& key, Entry** entry, |
| 180 const CompletionCallback& callback) OVERRIDE; | 180 const CompletionCallback& callback) OVERRIDE; |
| 181 virtual int DoomEntry(const std::string& key, | 181 virtual int DoomEntry(const std::string& key, |
| 182 const CompletionCallback& callback) OVERRIDE; | 182 const CompletionCallback& callback) OVERRIDE; |
| 183 virtual int DoomAllEntries(const CompletionCallback& callback) OVERRIDE; | 183 virtual int DoomAllEntries(const CompletionCallback& callback) OVERRIDE; |
| 184 virtual int DoomEntriesBetween(base::Time initial_time, | 184 virtual int DoomEntriesBetween(base::Time initial_time, |
| 185 base::Time end_time, | 185 base::Time end_time, |
| 186 const CompletionCallback& callback) OVERRIDE; | 186 const CompletionCallback& callback) OVERRIDE; |
| 187 virtual int DoomEntriesSince(base::Time initial_time, | 187 virtual int DoomEntriesSince(base::Time initial_time, |
| 188 const CompletionCallback& callback) OVERRIDE; | 188 const CompletionCallback& callback) OVERRIDE; |
| 189 virtual scoped_ptr<Iterator> CreateIterator() OVERRIDE; | 189 virtual int OpenNextEntry(void** iter, Entry** next_entry, |
| 190 const CompletionCallback& callback) OVERRIDE; |
| 191 virtual void EndEnumeration(void** iter) OVERRIDE; |
| 190 virtual void GetStats(StatsItems* stats) OVERRIDE; | 192 virtual void GetStats(StatsItems* stats) OVERRIDE; |
| 191 virtual void OnExternalCacheHit(const std::string& key) OVERRIDE; | 193 virtual void OnExternalCacheHit(const std::string& key) OVERRIDE; |
| 192 | 194 |
| 193 private: | 195 private: |
| 194 friend class EvictionV3; | 196 friend class EvictionV3; |
| 195 typedef base::hash_map<CacheAddr, EntryImplV3*> EntriesMap; | 197 typedef base::hash_map<CacheAddr, EntryImplV3*> EntriesMap; |
| 196 class IteratorImpl; | |
| 197 class NotImplementedIterator; | |
| 198 class Worker; | 198 class Worker; |
| 199 | 199 |
| 200 void AdjustMaxCacheSize(); | 200 void AdjustMaxCacheSize(); |
| 201 bool InitStats(void* stats_data); | 201 bool InitStats(void* stats_data); |
| 202 void StoreStats(); | 202 void StoreStats(); |
| 203 | 203 |
| 204 // Deletes the cache and starts again. | 204 // Deletes the cache and starts again. |
| 205 void RestartCache(bool failure); | 205 void RestartCache(bool failure); |
| 206 void PrepareForRestart(); | 206 void PrepareForRestart(); |
| 207 | 207 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 scoped_ptr<base::RepeatingTimer<BackendImplV3> > timer_; // Usage timer. | 272 scoped_ptr<base::RepeatingTimer<BackendImplV3> > timer_; // Usage timer. |
| 273 scoped_refptr<TraceObject> trace_object_; // Initializes internal tracing. | 273 scoped_refptr<TraceObject> trace_object_; // Initializes internal tracing. |
| 274 base::WeakPtrFactory<BackendImplV3> ptr_factory_; | 274 base::WeakPtrFactory<BackendImplV3> ptr_factory_; |
| 275 | 275 |
| 276 DISALLOW_COPY_AND_ASSIGN(BackendImplV3); | 276 DISALLOW_COPY_AND_ASSIGN(BackendImplV3); |
| 277 }; | 277 }; |
| 278 | 278 |
| 279 } // namespace disk_cache | 279 } // namespace disk_cache |
| 280 | 280 |
| 281 #endif // NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_V3_H_ | 281 #endif // NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_V3_H_ |
| OLD | NEW |