| 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_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 #pragma once | 9 #pragma once |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 virtual int DoomEntriesBetween(const base::Time initial_time, | 73 virtual int DoomEntriesBetween(const base::Time initial_time, |
| 74 const base::Time end_time, | 74 const base::Time end_time, |
| 75 CompletionCallback* callback); | 75 CompletionCallback* callback); |
| 76 virtual int DoomEntriesSince(const base::Time initial_time, | 76 virtual int DoomEntriesSince(const base::Time initial_time, |
| 77 CompletionCallback* callback); | 77 CompletionCallback* callback); |
| 78 virtual int OpenNextEntry(void** iter, Entry** next_entry, | 78 virtual int OpenNextEntry(void** iter, Entry** next_entry, |
| 79 CompletionCallback* callback); | 79 CompletionCallback* callback); |
| 80 virtual void EndEnumeration(void** iter); | 80 virtual void EndEnumeration(void** iter); |
| 81 virtual void GetStats( | 81 virtual void GetStats( |
| 82 std::vector<std::pair<std::string, std::string> >* stats) {} | 82 std::vector<std::pair<std::string, std::string> >* stats) {} |
| 83 virtual void OnExternalCacheHit(const std::string& key); |
| 83 | 84 |
| 84 private: | 85 private: |
| 85 typedef base::hash_map<std::string, MemEntryImpl*> EntryMap; | 86 typedef base::hash_map<std::string, MemEntryImpl*> EntryMap; |
| 86 | 87 |
| 87 // Old Backend interface. | 88 // Old Backend interface. |
| 88 bool OpenEntry(const std::string& key, Entry** entry); | 89 bool OpenEntry(const std::string& key, Entry** entry); |
| 89 bool CreateEntry(const std::string& key, Entry** entry); | 90 bool CreateEntry(const std::string& key, Entry** entry); |
| 90 bool DoomEntry(const std::string& key); | 91 bool DoomEntry(const std::string& key); |
| 91 bool DoomAllEntries(); | 92 bool DoomAllEntries(); |
| 92 bool DoomEntriesBetween(const base::Time initial_time, | 93 bool DoomEntriesBetween(const base::Time initial_time, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 109 int32 current_size_; | 110 int32 current_size_; |
| 110 | 111 |
| 111 net::NetLog* net_log_; | 112 net::NetLog* net_log_; |
| 112 | 113 |
| 113 DISALLOW_COPY_AND_ASSIGN(MemBackendImpl); | 114 DISALLOW_COPY_AND_ASSIGN(MemBackendImpl); |
| 114 }; | 115 }; |
| 115 | 116 |
| 116 } // namespace disk_cache | 117 } // namespace disk_cache |
| 117 | 118 |
| 118 #endif // NET_DISK_CACHE_MEM_BACKEND_IMPL_H__ | 119 #endif // NET_DISK_CACHE_MEM_BACKEND_IMPL_H__ |
| OLD | NEW |