| 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;
|
|
|