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

Unified Diff: net/disk_cache/entry_impl.cc

Issue 8658001: Disk cache: Add a hash to the entry's internal data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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/entry_impl.cc
===================================================================
--- net/disk_cache/entry_impl.cc (revision 110637)
+++ net/disk_cache/entry_impl.cc (working copy)
@@ -544,11 +544,6 @@
void EntryImpl::SetDirtyFlag(int32 current_id) {
DCHECK(node_.HasData());
- // We are checking if the entry is valid or not. If there is a pointer here,
- // we should not be checking the entry.
- if (node_.Data()->dummy)
- dirty_ = true;
-
if (node_.Data()->dirty && current_id != node_.Data()->dirty)
dirty_ = true;
@@ -558,7 +553,6 @@
void EntryImpl::SetPointerForInvalidEntry(int32 new_id) {
node_.Data()->dirty = new_id;
- node_.Data()->dummy = 0;
node_.Store();
}
@@ -571,6 +565,9 @@
// Basically, even if there is something wrong with this entry, we want to see
// if it is possible to load the rankings node and delete them together.
bool EntryImpl::SanityCheck() {
+ if (!entry_.VerifyHash())
+ return false;
+
EntryStore* stored = entry_.Data();
if (!stored->rankings_node || stored->key_len <= 0)
return false;

Powered by Google App Engine
This is Rietveld 408576698