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_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/hash_tables.h" | 10 #include "base/hash_tables.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 // Permanently deletes an entry, but still keeps track of it. | 98 // Permanently deletes an entry, but still keeps track of it. |
99 void InternalDoomEntry(EntryImpl* entry); | 99 void InternalDoomEntry(EntryImpl* entry); |
100 | 100 |
101 // Removes all references to this entry. | 101 // Removes all references to this entry. |
102 void RemoveEntry(EntryImpl* entry); | 102 void RemoveEntry(EntryImpl* entry); |
103 | 103 |
104 // This method must be called whenever an entry is released for the last time. | 104 // This method must be called whenever an entry is released for the last time. |
105 // |address| is the cache address of the entry. | 105 // |address| is the cache address of the entry. |
106 void CacheEntryDestroyed(Addr address); | 106 void CacheEntryDestroyed(Addr address); |
107 | 107 |
108 // Returns true if the data stored by the provided |rankings| points to an | 108 // If the data stored by the provided |rankings| points to an open entry, |
109 // open entry, false otherwise. | 109 // returns a pointer to that entry, oterwise returns NULL. Note that this |
Nicolas Sylvain
2009/07/30 18:37:28
otherwise
| |
110 bool IsOpen(CacheRankingsBlock* rankings) const; | 110 // method does NOT increase the ref counter for the entry. |
111 EntryImpl* GetOpenEntry(CacheRankingsBlock* rankings) const; | |
111 | 112 |
112 // Returns the id being used on this run of the cache. | 113 // Returns the id being used on this run of the cache. |
113 int32 GetCurrentEntryId() const; | 114 int32 GetCurrentEntryId() const; |
114 | 115 |
115 // Returns the maximum size for a file to reside on the cache. | 116 // Returns the maximum size for a file to reside on the cache. |
116 int MaxFileSize() const; | 117 int MaxFileSize() const; |
117 | 118 |
118 // A user data block is being created, extended or truncated. | 119 // A user data block is being created, extended or truncated. |
119 void ModifyStorageSize(int32 old_size, int32 new_size); | 120 void ModifyStorageSize(int32 old_size, int32 new_size); |
120 | 121 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
278 | 279 |
279 DISALLOW_EVIL_CONSTRUCTORS(BackendImpl); | 280 DISALLOW_EVIL_CONSTRUCTORS(BackendImpl); |
280 }; | 281 }; |
281 | 282 |
282 // Returns the prefered max cache size given the available disk space. | 283 // Returns the prefered max cache size given the available disk space. |
283 int PreferedCacheSize(int64 available); | 284 int PreferedCacheSize(int64 available); |
284 | 285 |
285 } // namespace disk_cache | 286 } // namespace disk_cache |
286 | 287 |
287 #endif // NET_DISK_CACHE_BACKEND_IMPL_H_ | 288 #endif // NET_DISK_CACHE_BACKEND_IMPL_H_ |
OLD | NEW |