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

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

Issue 27345: New disk cache eviction algorithm. (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
« no previous file with comments | « net/disk_cache/disk_format.h ('k') | net/disk_cache/entry_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_ENTRY_IMPL_H__ 5 #ifndef NET_DISK_CACHE_ENTRY_IMPL_H_
6 #define NET_DISK_CACHE_ENTRY_IMPL_H__ 6 #define NET_DISK_CACHE_ENTRY_IMPL_H_
7 7
8 #include "net/disk_cache/disk_cache.h" 8 #include "net/disk_cache/disk_cache.h"
9 #include "net/disk_cache/storage_block.h" 9 #include "net/disk_cache/storage_block.h"
10 #include "net/disk_cache/storage_block-inl.h" 10 #include "net/disk_cache/storage_block-inl.h"
11 11
12 namespace disk_cache { 12 namespace disk_cache {
13 13
14 class BackendImpl; 14 class BackendImpl;
15 15
16 // This class implements the Entry interface. An object of this 16 // This class implements the Entry interface. An object of this
(...skipping 28 matching lines...) Expand all
45 45
46 uint32 GetHash(); 46 uint32 GetHash();
47 47
48 // Performs the initialization of a EntryImpl that will be added to the 48 // Performs the initialization of a EntryImpl that will be added to the
49 // cache. 49 // cache.
50 bool CreateEntry(Addr node_address, const std::string& key, uint32 hash); 50 bool CreateEntry(Addr node_address, const std::string& key, uint32 hash);
51 51
52 // Returns true if this entry matches the lookup arguments. 52 // Returns true if this entry matches the lookup arguments.
53 bool IsSameEntry(const std::string& key, uint32 hash); 53 bool IsSameEntry(const std::string& key, uint32 hash);
54 54
55 // Permamently destroys this entry 55 // Permamently destroys this entry.
56 void InternalDoom(); 56 void InternalDoom();
57 57
58 // Deletes this entry from disk. If |everything| is false, only the user data
59 // will be removed, leaving the key and control data intact.
60 void DeleteEntryData(bool everything);
61
58 // Returns the address of the next entry on the list of entries with the same 62 // Returns the address of the next entry on the list of entries with the same
59 // hash. 63 // hash.
60 CacheAddr GetNextAddress(); 64 CacheAddr GetNextAddress();
61 65
62 // Sets the address of the next entry on the list of entries with the same 66 // Sets the address of the next entry on the list of entries with the same
63 // hash. 67 // hash.
64 void SetNextAddress(Addr address); 68 void SetNextAddress(Addr address);
65 69
66 // Reloads the rankings node information. 70 // Reloads the rankings node information.
67 bool LoadNodeAddress(); 71 bool LoadNodeAddress();
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // data and key. 145 // data and key.
142 int unreported_size_[NUM_STREAMS]; // Bytes not reported yet to the backend. 146 int unreported_size_[NUM_STREAMS]; // Bytes not reported yet to the backend.
143 bool doomed_; // True if this entry was removed from the cache. 147 bool doomed_; // True if this entry was removed from the cache.
144 bool need_file_[NUM_STREAMS]; // True if stream is prepared as an external 148 bool need_file_[NUM_STREAMS]; // True if stream is prepared as an external
145 // file. 149 // file.
146 DISALLOW_EVIL_CONSTRUCTORS(EntryImpl); 150 DISALLOW_EVIL_CONSTRUCTORS(EntryImpl);
147 }; 151 };
148 152
149 } // namespace disk_cache 153 } // namespace disk_cache
150 154
151 #endif // NET_DISK_CACHE_ENTRY_IMPL_H__ 155 #endif // NET_DISK_CACHE_ENTRY_IMPL_H_
152 156
OLDNEW
« no previous file with comments | « net/disk_cache/disk_format.h ('k') | net/disk_cache/entry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698