From 66f16b11638993ead4028e853d5565a74b9acba3 Mon Sep 17 00:00:00 2001 From: "rvargas@google.com" Date: Thu, 30 Jul 2009 18:51:41 +0000 Subject: 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 --- net/disk_cache/backend_impl.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'net/disk_cache/backend_impl.cc') 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 -- cgit v1.1