| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_MEM_BACKEND_IMPL_H__ | 7 #ifndef NET_DISK_CACHE_MEM_BACKEND_IMPL_H__ |
| 8 #define NET_DISK_CACHE_MEM_BACKEND_IMPL_H__ | 8 #define NET_DISK_CACHE_MEM_BACKEND_IMPL_H__ |
| 9 | 9 |
| 10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 // Performs general initialization for this current instance of the cache. | 26 // Performs general initialization for this current instance of the cache. |
| 27 bool Init(); | 27 bool Init(); |
| 28 | 28 |
| 29 // Backend interface. | 29 // Backend interface. |
| 30 virtual int32 GetEntryCount() const; | 30 virtual int32 GetEntryCount() const; |
| 31 virtual bool OpenEntry(const std::string& key, Entry** entry); | 31 virtual bool OpenEntry(const std::string& key, Entry** entry); |
| 32 virtual bool CreateEntry(const std::string& key, Entry** entry); | 32 virtual bool CreateEntry(const std::string& key, Entry** entry); |
| 33 virtual bool DoomEntry(const std::string& key); | 33 virtual bool DoomEntry(const std::string& key); |
| 34 virtual bool DoomAllEntries(); | 34 virtual bool DoomAllEntries(); |
| 35 virtual bool DoomEntriesBetween(const Time initial_time, const Time end_time); | 35 virtual bool DoomEntriesBetween(const base::Time initial_time, |
| 36 virtual bool DoomEntriesSince(const Time initial_time); | 36 const base::Time end_time); |
| 37 virtual bool DoomEntriesSince(const base::Time initial_time); |
| 37 virtual bool OpenNextEntry(void** iter, Entry** next_entry); | 38 virtual bool OpenNextEntry(void** iter, Entry** next_entry); |
| 38 virtual void EndEnumeration(void** iter); | 39 virtual void EndEnumeration(void** iter); |
| 39 virtual void GetStats( | 40 virtual void GetStats( |
| 40 std::vector<std::pair<std::string, std::string> >* stats) {} | 41 std::vector<std::pair<std::string, std::string> >* stats) {} |
| 41 | 42 |
| 42 // Sets the maximum size for the total amount of data stored by this instance. | 43 // Sets the maximum size for the total amount of data stored by this instance. |
| 43 bool SetMaxSize(int max_bytes); | 44 bool SetMaxSize(int max_bytes); |
| 44 | 45 |
| 45 // Permanently deletes an entry. | 46 // Permanently deletes an entry. |
| 46 void InternalDoomEntry(MemEntryImpl* entry); | 47 void InternalDoomEntry(MemEntryImpl* entry); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 70 MemRankings rankings_; // Rankings to be able to trim the cache. | 71 MemRankings rankings_; // Rankings to be able to trim the cache. |
| 71 int32 max_size_; // Maximum data size for this instance. | 72 int32 max_size_; // Maximum data size for this instance. |
| 72 int32 current_size_; | 73 int32 current_size_; |
| 73 | 74 |
| 74 DISALLOW_EVIL_CONSTRUCTORS(MemBackendImpl); | 75 DISALLOW_EVIL_CONSTRUCTORS(MemBackendImpl); |
| 75 }; | 76 }; |
| 76 | 77 |
| 77 } // namespace disk_cache | 78 } // namespace disk_cache |
| 78 | 79 |
| 79 #endif // NET_DISK_CACHE_MEM_BACKEND_IMPL_H__ | 80 #endif // NET_DISK_CACHE_MEM_BACKEND_IMPL_H__ |
| OLD | NEW |