OLD | NEW |
---|---|
1 // Copyright (c) 2006-2008 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 #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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/task.h" | 10 #include "base/task.h" |
11 #include "net/disk_cache/disk_format.h" | 11 #include "net/disk_cache/disk_format.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 void UpdateRankV2(EntryImpl* entry, bool modified); | 59 void UpdateRankV2(EntryImpl* entry, bool modified); |
60 void OnOpenEntryV2(EntryImpl* entry); | 60 void OnOpenEntryV2(EntryImpl* entry); |
61 void OnCreateEntryV2(EntryImpl* entry); | 61 void OnCreateEntryV2(EntryImpl* entry); |
62 void OnDoomEntryV2(EntryImpl* entry); | 62 void OnDoomEntryV2(EntryImpl* entry); |
63 void OnDestroyEntryV2(EntryImpl* entry); | 63 void OnDestroyEntryV2(EntryImpl* entry); |
64 Rankings::List GetListForEntryV2(EntryImpl* entry); | 64 Rankings::List GetListForEntryV2(EntryImpl* entry); |
65 void TrimDeleted(bool empty); | 65 void TrimDeleted(bool empty); |
66 bool RemoveDeletedNode(CacheRankingsBlock* node); | 66 bool RemoveDeletedNode(CacheRankingsBlock* node); |
67 | 67 |
68 bool NodeIsOldEnough(CacheRankingsBlock* node, int list); | 68 bool NodeIsOldEnough(CacheRankingsBlock* node, int list); |
69 int SelectListByLenght(); | 69 int SelectListByLenght(Rankings::ScopedRankingsBlock* next); |
gavinp
2011/05/10 21:23:23
While we're at it, SelectListByLength is a good fi
rvargas (doing something else)
2011/05/10 21:32:37
Done.
| |
70 void ReportListStats(); | 70 void ReportListStats(); |
71 | 71 |
72 BackendImpl* backend_; | 72 BackendImpl* backend_; |
73 Rankings* rankings_; | 73 Rankings* rankings_; |
74 IndexHeader* header_; | 74 IndexHeader* header_; |
75 int max_size_; | 75 int max_size_; |
76 int trim_delays_; | 76 int trim_delays_; |
77 bool new_eviction_; | 77 bool new_eviction_; |
78 bool first_trim_; | 78 bool first_trim_; |
79 bool trimming_; | 79 bool trimming_; |
80 bool delay_trim_; | 80 bool delay_trim_; |
81 bool init_; | 81 bool init_; |
82 bool test_mode_; | 82 bool test_mode_; |
83 bool in_experiment_; | 83 bool in_experiment_; |
84 ScopedRunnableMethodFactory<Eviction> factory_; | 84 ScopedRunnableMethodFactory<Eviction> factory_; |
85 | 85 |
86 DISALLOW_COPY_AND_ASSIGN(Eviction); | 86 DISALLOW_COPY_AND_ASSIGN(Eviction); |
87 }; | 87 }; |
88 | 88 |
89 } // namespace disk_cache | 89 } // namespace disk_cache |
90 | 90 |
91 #endif // NET_DISK_CACHE_EVICTION_H_ | 91 #endif // NET_DISK_CACHE_EVICTION_H_ |
OLD | NEW |