diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-18 00:22:08 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-18 00:22:08 +0000 |
commit | df4825733e94311ffdefbbed6fecc93203886243 (patch) | |
tree | 5dd5fbe5a2d3163cff7752a5abf647bfcb2ffb0e /net/disk_cache/rankings.cc | |
parent | 4364d3ed5abb7fc2788508cac79ecd8a8703289a (diff) | |
download | chromium_src-df4825733e94311ffdefbbed6fecc93203886243.zip chromium_src-df4825733e94311ffdefbbed6fecc93203886243.tar.gz chromium_src-df4825733e94311ffdefbbed6fecc93203886243.tar.bz2 |
Disk cache: move eviction code to a separate file.
There should be no change in behavior with this CL.
Review URL: http://codereview.chromium.org/14183
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7190 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/rankings.cc')
-rw-r--r-- | net/disk_cache/rankings.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/disk_cache/rankings.cc b/net/disk_cache/rankings.cc index 286998e..e3ff489 100644 --- a/net/disk_cache/rankings.cc +++ b/net/disk_cache/rankings.cc @@ -495,6 +495,8 @@ CacheRankingsBlock* Rankings::GetNext(CacheRankingsBlock* node, List list) { if (my_tail.value() == node->address().value()) return NULL; Addr address(node->Data()->next); + if (address.value() == node->address().value()) + return NULL; // Another tail? fail it. next.reset(new CacheRankingsBlock(backend_->File(address), address)); } @@ -523,6 +525,8 @@ CacheRankingsBlock* Rankings::GetPrev(CacheRankingsBlock* node, List list) { if (my_head.value() == node->address().value()) return NULL; Addr address(node->Data()->prev); + if (address.value() == node->address().value()) + return NULL; // Another head? fail it. prev.reset(new CacheRankingsBlock(backend_->File(address), address)); } |