| 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 #ifndef NET_DISK_CACHE_EVICTION_H_ | 5 #ifndef NET_DISK_CACHE_EVICTION_H_ |
| 6 #define NET_DISK_CACHE_EVICTION_H_ | 6 #define NET_DISK_CACHE_EVICTION_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/task.h" | 10 #include "base/task.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // finished. | 49 // finished. |
| 50 void TrimCacheV2(bool empty); | 50 void TrimCacheV2(bool empty); |
| 51 void UpdateRankV2(EntryImpl* entry, bool modified); | 51 void UpdateRankV2(EntryImpl* entry, bool modified); |
| 52 void OnOpenEntryV2(EntryImpl* entry); | 52 void OnOpenEntryV2(EntryImpl* entry); |
| 53 void OnCreateEntryV2(EntryImpl* entry); | 53 void OnCreateEntryV2(EntryImpl* entry); |
| 54 void OnDoomEntryV2(EntryImpl* entry); | 54 void OnDoomEntryV2(EntryImpl* entry); |
| 55 void OnDestroyEntryV2(EntryImpl* entry); | 55 void OnDestroyEntryV2(EntryImpl* entry); |
| 56 Rankings::List GetListForEntryV2(EntryImpl* entry); | 56 Rankings::List GetListForEntryV2(EntryImpl* entry); |
| 57 void TrimDeleted(bool empty); | 57 void TrimDeleted(bool empty); |
| 58 bool RemoveDeletedNode(CacheRankingsBlock* node); | 58 bool RemoveDeletedNode(CacheRankingsBlock* node); |
| 59 | 59 |
| 60 bool NodeIsOldEnough(CacheRankingsBlock* node, int list); | 60 bool NodeIsOldEnough(CacheRankingsBlock* node, int list); |
| 61 int SelectListByLenght(); | 61 int SelectListByLenght(); |
| 62 | 62 |
| 63 BackendImpl* backend_; | 63 BackendImpl* backend_; |
| 64 Rankings* rankings_; | 64 Rankings* rankings_; |
| 65 IndexHeader* header_; | 65 IndexHeader* header_; |
| 66 int max_size_; | 66 int max_size_; |
| 67 bool new_eviction_; | 67 bool new_eviction_; |
| 68 bool first_trim_; |
| 68 ScopedRunnableMethodFactory<Eviction> factory_; | 69 ScopedRunnableMethodFactory<Eviction> factory_; |
| 69 | 70 |
| 70 DISALLOW_COPY_AND_ASSIGN(Eviction); | 71 DISALLOW_COPY_AND_ASSIGN(Eviction); |
| 71 }; | 72 }; |
| 72 | 73 |
| 73 } // namespace disk_cache | 74 } // namespace disk_cache |
| 74 | 75 |
| 75 #endif // NET_DISK_CACHE_EVICTION_H_ | 76 #endif // NET_DISK_CACHE_EVICTION_H_ |
| OLD | NEW |