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

Unified Diff: net/disk_cache/eviction.cc

Issue 159643: Disk cache: Remove remaining uses of RankingsNode.pointer.... (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 side-by-side diff with in-line comments
Download patch
Index: net/disk_cache/eviction.cc
===================================================================
--- net/disk_cache/eviction.cc (revision 21923)
+++ net/disk_cache/eviction.cc (working copy)
@@ -92,7 +92,7 @@
break;
node.reset(next.release());
next.reset(rankings_->GetPrev(node.get(), Rankings::NO_USE));
- if (!node->Data()->pointer || empty) {
+ if (node->Data()->dirty != backend_->GetCurrentEntryId() || empty) {
// This entry is not being used by anybody.
// Do NOT use node as an iterator after this point.
rankings_->TrackRankingsBlock(node.get(), false);
@@ -275,7 +275,7 @@
node.reset(next[list].release());
next[list].reset(rankings_->GetPrev(node.get(),
static_cast<Rankings::List>(list)));
- if (!node->Data()->pointer || empty) {
+ if (node->Data()->dirty != backend_->GetCurrentEntryId() || empty) {
// This entry is not being used by anybody.
// Do NOT use node as an iterator after this point.
rankings_->TrackRankingsBlock(node.get(), false);
@@ -425,7 +425,7 @@
// TODO(rvargas): figure out how to deal with corruption at this point (dirty
// entries that live in this list).
- if (node->Data()->pointer) {
+ if (node->Data()->dirty) {
// We ignore the failure; we're removing the entry anyway.
entry->Update();
}

Powered by Google App Engine
This is Rietveld 408576698