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

Unified Diff: net/disk_cache/entry_impl.cc

Issue 10148001: Disk Cache: Add more corruption tracking histograms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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/entry_impl.cc
===================================================================
--- net/disk_cache/entry_impl.cc (revision 133063)
+++ net/disk_cache/entry_impl.cc (working copy)
@@ -577,21 +577,16 @@
return false;
Addr rankings_addr(stored->rankings_node);
- if (!rankings_addr.is_initialized() || rankings_addr.is_separate_file() ||
- rankings_addr.file_type() != RANKINGS || rankings_addr.num_blocks() != 1)
+ if (!rankings_addr.SanityCheckForRankings())
return false;
Addr next_addr(stored->next);
- if (next_addr.is_initialized() &&
- (next_addr.is_separate_file() || next_addr.file_type() != BLOCK_256)) {
+ if (next_addr.is_initialized() && !next_addr.SanityCheckForEntry()) {
STRESS_NOTREACHED();
return false;
}
STRESS_DCHECK(next_addr.value() != entry_.address().value());
- if (!rankings_addr.SanityCheck() || !next_addr.SanityCheck())
- return false;
-
if (stored->state > ENTRY_DOOMED || stored->state < ENTRY_NORMAL)
return false;

Powered by Google App Engine
This is Rietveld 408576698