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_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 #pragma once | 9 #pragma once |
10 | 10 |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 // Opens the next or previous entry on a cache iteration. | 295 // Opens the next or previous entry on a cache iteration. |
296 EntryImpl* OpenFollowingEntry(bool forward, void** iter); | 296 EntryImpl* OpenFollowingEntry(bool forward, void** iter); |
297 | 297 |
298 // Opens the next or previous entry on a single list. If successfull, | 298 // Opens the next or previous entry on a single list. If successfull, |
299 // |from_entry| will be updated to point to the new entry, otherwise it will | 299 // |from_entry| will be updated to point to the new entry, otherwise it will |
300 // be set to NULL; in other words, it is used as an explicit iterator. | 300 // be set to NULL; in other words, it is used as an explicit iterator. |
301 bool OpenFollowingEntryFromList(bool forward, Rankings::List list, | 301 bool OpenFollowingEntryFromList(bool forward, Rankings::List list, |
302 CacheRankingsBlock** from_entry, | 302 CacheRankingsBlock** from_entry, |
303 EntryImpl** next_entry); | 303 EntryImpl** next_entry); |
304 | 304 |
305 // Returns the entry that is pointed by |next|. | 305 // Returns the entry that is pointed by |next|, from the given |list|. |
306 EntryImpl* GetEnumeratedEntry(CacheRankingsBlock* next); | 306 EntryImpl* GetEnumeratedEntry(CacheRankingsBlock* next, Rankings::List list); |
307 | 307 |
308 // Re-opens an entry that was previously deleted. | 308 // Re-opens an entry that was previously deleted. |
309 EntryImpl* ResurrectEntry(EntryImpl* deleted_entry); | 309 EntryImpl* ResurrectEntry(EntryImpl* deleted_entry); |
310 | 310 |
311 void DestroyInvalidEntry(EntryImpl* entry); | 311 void DestroyInvalidEntry(EntryImpl* entry); |
312 | 312 |
313 // Handles the used storage count. | 313 // Handles the used storage count. |
314 void AddStorageSize(int32 bytes); | 314 void AddStorageSize(int32 bytes); |
315 void SubstractStorageSize(int32 bytes); | 315 void SubstractStorageSize(int32 bytes); |
316 | 316 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 | 381 |
382 DISALLOW_COPY_AND_ASSIGN(BackendImpl); | 382 DISALLOW_COPY_AND_ASSIGN(BackendImpl); |
383 }; | 383 }; |
384 | 384 |
385 // Returns the prefered max cache size given the available disk space. | 385 // Returns the prefered max cache size given the available disk space. |
386 NET_EXPORT_PRIVATE int PreferedCacheSize(int64 available); | 386 NET_EXPORT_PRIVATE int PreferedCacheSize(int64 available); |
387 | 387 |
388 } // namespace disk_cache | 388 } // namespace disk_cache |
389 | 389 |
390 #endif // NET_DISK_CACHE_BACKEND_IMPL_H_ | 390 #endif // NET_DISK_CACHE_BACKEND_IMPL_H_ |
OLD | NEW |