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

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

Issue 149218: Disk cache: Keep a map of all open entries.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #include "net/disk_cache/disk_cache.h" 9 #include "net/disk_cache/disk_cache.h"
10 #include "net/disk_cache/storage_block.h" 10 #include "net/disk_cache/storage_block.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // hash. 69 // hash.
70 CacheAddr GetNextAddress(); 70 CacheAddr GetNextAddress();
71 71
72 // Sets the address of the next entry on the list of entries with the same 72 // Sets the address of the next entry on the list of entries with the same
73 // hash. 73 // hash.
74 void SetNextAddress(Addr address); 74 void SetNextAddress(Addr address);
75 75
76 // Reloads the rankings node information. 76 // Reloads the rankings node information.
77 bool LoadNodeAddress(); 77 bool LoadNodeAddress();
78 78
79 // Reloads the data for this entry. If there is already an object in memory 79 // Updates the stored data to reflect the run-time information for this entry.
80 // for the entry, the returned value is a pointer to that entry, otherwise 80 // Returns false if the data could not be updated. The purpose of this method
81 // it is the passed in entry. On failure returns NULL. 81 // is to be able to detect entries that are currently in use.
82 static EntryImpl* Update(EntryImpl* entry); 82 bool Update();
83 83
84 // Returns true if this entry is marked as dirty on disk. 84 // Returns true if this entry is marked as dirty on disk.
85 bool IsDirty(int32 current_id); 85 bool IsDirty(int32 current_id);
86 void ClearDirtyFlag(); 86 void ClearDirtyFlag();
87 87
88 // Fixes this entry so it can be treated as valid (to delete it). 88 // Fixes this entry so it can be treated as valid (to delete it).
89 void SetPointerForInvalidEntry(int32 new_id); 89 void SetPointerForInvalidEntry(int32 new_id);
90 90
91 // Returns false if the entry is clearly invalid. 91 // Returns false if the entry is clearly invalid.
92 bool SanityCheck(); 92 bool SanityCheck();
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 int unreported_size_[kNumStreams]; // Bytes not reported yet to the backend. 165 int unreported_size_[kNumStreams]; // Bytes not reported yet to the backend.
166 bool doomed_; // True if this entry was removed from the cache. 166 bool doomed_; // True if this entry was removed from the cache.
167 scoped_ptr<SparseControl> sparse_; // Support for sparse entries. 167 scoped_ptr<SparseControl> sparse_; // Support for sparse entries.
168 168
169 DISALLOW_EVIL_CONSTRUCTORS(EntryImpl); 169 DISALLOW_EVIL_CONSTRUCTORS(EntryImpl);
170 }; 170 };
171 171
172 } // namespace disk_cache 172 } // namespace disk_cache
173 173
174 #endif // NET_DISK_CACHE_ENTRY_IMPL_H_ 174 #endif // NET_DISK_CACHE_ENTRY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698