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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 Addr* block_address); | 110 Addr* block_address); |
111 | 111 |
112 // Deletes a given storage block. deep set to true can be used to zero-fill | 112 // Deletes a given storage block. deep set to true can be used to zero-fill |
113 // the related storage in addition of releasing the related block. | 113 // the related storage in addition of releasing the related block. |
114 void DeleteBlock(Addr block_address, bool deep); | 114 void DeleteBlock(Addr block_address, bool deep); |
115 | 115 |
116 // Retrieves a pointer to the LRU-related data. | 116 // Retrieves a pointer to the LRU-related data. |
117 LruData* GetLruData(); | 117 LruData* GetLruData(); |
118 | 118 |
119 // Updates the ranking information for an entry. | 119 // Updates the ranking information for an entry. |
| 120 void UpdateRankOnCacheHit(EntryImpl* entry, bool modified); |
| 121 |
| 122 // Updates the ranking information for an entry. |
120 void UpdateRank(EntryImpl* entry, bool modified); | 123 void UpdateRank(EntryImpl* entry, bool modified); |
121 | 124 |
122 // A node was recovered from a crash, it may not be on the index, so this | 125 // A node was recovered from a crash, it may not be on the index, so this |
123 // method checks it and takes the appropriate action. | 126 // method checks it and takes the appropriate action. |
124 void RecoveredEntry(CacheRankingsBlock* rankings); | 127 void RecoveredEntry(CacheRankingsBlock* rankings); |
125 | 128 |
126 // Permanently deletes an entry, but still keeps track of it. | 129 // Permanently deletes an entry, but still keeps track of it. |
127 void InternalDoomEntry(EntryImpl* entry); | 130 void InternalDoomEntry(EntryImpl* entry); |
128 | 131 |
129 #if defined(NET_BUILD_STRESS_CACHE) | 132 #if defined(NET_BUILD_STRESS_CACHE) |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 | 397 |
395 DISALLOW_COPY_AND_ASSIGN(BackendImpl); | 398 DISALLOW_COPY_AND_ASSIGN(BackendImpl); |
396 }; | 399 }; |
397 | 400 |
398 // Returns the preferred max cache size given the available disk space. | 401 // Returns the preferred max cache size given the available disk space. |
399 NET_EXPORT_PRIVATE int PreferedCacheSize(int64 available); | 402 NET_EXPORT_PRIVATE int PreferedCacheSize(int64 available); |
400 | 403 |
401 } // namespace disk_cache | 404 } // namespace disk_cache |
402 | 405 |
403 #endif // NET_DISK_CACHE_BACKEND_IMPL_H_ | 406 #endif // NET_DISK_CACHE_BACKEND_IMPL_H_ |
OLD | NEW |