summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/backend_impl.cc
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-30 18:51:41 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-30 18:51:41 +0000
commit66f16b11638993ead4028e853d5565a74b9acba3 (patch)
tree2166dd5ebb9d17d32f7fdd984425e15d58c66f0c /net/disk_cache/backend_impl.cc
parentd861c764cf88c5d99327ef15bb603373186c5bda (diff)
downloadchromium_src-66f16b11638993ead4028e853d5565a74b9acba3.zip
chromium_src-66f16b11638993ead4028e853d5565a74b9acba3.tar.gz
chromium_src-66f16b11638993ead4028e853d5565a74b9acba3.tar.bz2
Disk cache: Remove remaining uses of RankingsNode.pointer.
We now have a map of open entries so we don't need to do a lookup through the rankings node anymore. This simplifies the 64 bit version of the code. BUG=17881 TEST=unittests Review URL: http://codereview.chromium.org/159643 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22074 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/backend_impl.cc')
-rw-r--r--net/disk_cache/backend_impl.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc
index 5993187..ea5caf3 100644
--- a/net/disk_cache/backend_impl.cc
+++ b/net/disk_cache/backend_impl.cc
@@ -762,16 +762,16 @@ void BackendImpl::CacheEntryDestroyed(Addr address) {
DecreaseNumRefs();
}
-bool BackendImpl::IsOpen(CacheRankingsBlock* rankings) const {
+EntryImpl* BackendImpl::GetOpenEntry(CacheRankingsBlock* rankings) const {
DCHECK(rankings->HasData());
EntriesMap::const_iterator it =
open_entries_.find(rankings->Data()->contents);
if (it != open_entries_.end()) {
// We have this entry in memory.
- return rankings->Data()->pointer == it->second;
+ return it->second;
}
- return false;
+ return NULL;
}
int32 BackendImpl::GetCurrentEntryId() const {
@@ -1641,7 +1641,7 @@ int BackendImpl::CheckAllEntries() {
bool BackendImpl::CheckEntry(EntryImpl* cache_entry) {
RankingsNode* rankings = cache_entry->rankings()->Data();
- return !rankings->pointer;
+ return !rankings->dummy;
}
} // namespace disk_cache