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

Unified Diff: net/disk_cache/rankings.h

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/rankings.h
===================================================================
--- net/disk_cache/rankings.h (revision 133063)
+++ net/disk_cache/rankings.h (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -146,6 +146,11 @@
typedef std::pair<CacheAddr, CacheRankingsBlock*> IteratorPair;
typedef std::list<IteratorPair> IteratorList;
+ enum ListDirection {
+ FORWARD,
+ BACKWARD
+ };
+
void ReadHeads();
void ReadTails();
void WriteHead(List list);
@@ -164,10 +169,6 @@
void FinishInsert(CacheRankingsBlock* rankings);
void RevertRemove(CacheRankingsBlock* rankings);
- // Returns false if this entry will not be recognized as dirty (called during
- // selfcheck).
- bool CheckEntry(CacheRankingsBlock* rankings);
-
// Returns false if node is not properly linked. This method may change the
// provided |list| to reflect the list where this node is actually stored.
bool CheckLinks(CacheRankingsBlock* node, CacheRankingsBlock* prev,
@@ -180,6 +181,12 @@
// error code (negative value).
int CheckList(List list);
+ // Walks a list in the desired direction until the nodes |end1| or |end2| are
+ // reached. Returns an error code (0 on success), the number of items verified
+ // and the addresses of the last nodes visited.
+ int CheckListSection(List list, Addr end1, Addr end2, ListDirection dir,
+ Addr* last, Addr* second_last, int* num_items);
+
// Returns true if addr is the head or tail of any list. When there is a
// match |list| will contain the list number for |addr|.
bool IsHead(CacheAddr addr, List* list) const;
« no previous file with comments | « net/disk_cache/errors.h ('k') | net/disk_cache/rankings.cc » ('j') | net/disk_cache/rankings.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698