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_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/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // Insert an MemEntryImpl into the ranking list. This method is only called | 55 // Insert an MemEntryImpl into the ranking list. This method is only called |
56 // from MemEntryImpl to insert child entries. The reference can be removed | 56 // from MemEntryImpl to insert child entries. The reference can be removed |
57 // by calling RemoveFromRankingList(|entry|). | 57 // by calling RemoveFromRankingList(|entry|). |
58 void InsertIntoRankingList(MemEntryImpl* entry); | 58 void InsertIntoRankingList(MemEntryImpl* entry); |
59 | 59 |
60 // Remove |entry| from ranking list. This method is only called from | 60 // Remove |entry| from ranking list. This method is only called from |
61 // MemEntryImpl to remove a child entry from the ranking list. | 61 // MemEntryImpl to remove a child entry from the ranking list. |
62 void RemoveFromRankingList(MemEntryImpl* entry); | 62 void RemoveFromRankingList(MemEntryImpl* entry); |
63 | 63 |
64 // Backend interface. | 64 // Backend interface. |
| 65 virtual net::CacheType GetCacheType() const OVERRIDE; |
65 virtual int32 GetEntryCount() const OVERRIDE; | 66 virtual int32 GetEntryCount() const OVERRIDE; |
66 virtual int OpenEntry(const std::string& key, Entry** entry, | 67 virtual int OpenEntry(const std::string& key, Entry** entry, |
67 const CompletionCallback& callback) OVERRIDE; | 68 const CompletionCallback& callback) OVERRIDE; |
68 virtual int CreateEntry(const std::string& key, Entry** entry, | 69 virtual int CreateEntry(const std::string& key, Entry** entry, |
69 const CompletionCallback& callback) OVERRIDE; | 70 const CompletionCallback& callback) OVERRIDE; |
70 virtual int DoomEntry(const std::string& key, | 71 virtual int DoomEntry(const std::string& key, |
71 const CompletionCallback& callback) OVERRIDE; | 72 const CompletionCallback& callback) OVERRIDE; |
72 virtual int DoomAllEntries(const CompletionCallback& callback) OVERRIDE; | 73 virtual int DoomAllEntries(const CompletionCallback& callback) OVERRIDE; |
73 virtual int DoomEntriesBetween(const base::Time initial_time, | 74 virtual int DoomEntriesBetween(const base::Time initial_time, |
74 const base::Time end_time, | 75 const base::Time end_time, |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 int32 current_size_; | 111 int32 current_size_; |
111 | 112 |
112 net::NetLog* net_log_; | 113 net::NetLog* net_log_; |
113 | 114 |
114 DISALLOW_COPY_AND_ASSIGN(MemBackendImpl); | 115 DISALLOW_COPY_AND_ASSIGN(MemBackendImpl); |
115 }; | 116 }; |
116 | 117 |
117 } // namespace disk_cache | 118 } // namespace disk_cache |
118 | 119 |
119 #endif // NET_DISK_CACHE_MEM_BACKEND_IMPL_H__ | 120 #endif // NET_DISK_CACHE_MEM_BACKEND_IMPL_H__ |
OLD | NEW |