Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: net/disk_cache/eviction.h

Issue 48112: Disk cache: First implementation of TrimDeleted() and a few... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // new eviction algorithm. This code will replace the original methods when 48 // new eviction algorithm. This code will replace the original methods when
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 59
59 bool NodeIsOldEnough(CacheRankingsBlock* node, int list); 60 bool NodeIsOldEnough(CacheRankingsBlock* node, int list);
60 int SelectListByLenght(); 61 int SelectListByLenght();
61 62
62 BackendImpl* backend_; 63 BackendImpl* backend_;
63 Rankings* rankings_; 64 Rankings* rankings_;
64 IndexHeader* header_; 65 IndexHeader* header_;
65 int max_size_; 66 int max_size_;
66 bool new_eviction_; 67 bool new_eviction_;
67 ScopedRunnableMethodFactory<Eviction> factory_; 68 ScopedRunnableMethodFactory<Eviction> factory_;
68 69
69 DISALLOW_COPY_AND_ASSIGN(Eviction); 70 DISALLOW_COPY_AND_ASSIGN(Eviction);
70 }; 71 };
71 72
72 } // namespace disk_cache 73 } // namespace disk_cache
73 74
74 #endif // NET_DISK_CACHE_EVICTION_H_ 75 #endif // NET_DISK_CACHE_EVICTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698