diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-17 20:17:29 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-17 20:17:29 +0000 |
commit | 128369396677f4480166e12d5e14d2a578336f3f (patch) | |
tree | 088edff14c68b7ace2ab6e5123e642c1e07d7863 /net/disk_cache/rankings.h | |
parent | 6e8401da30af0b3a4ab350bbd261b41589a568f9 (diff) | |
download | chromium_src-128369396677f4480166e12d5e14d2a578336f3f.zip chromium_src-128369396677f4480166e12d5e14d2a578336f3f.tar.gz chromium_src-128369396677f4480166e12d5e14d2a578336f3f.tar.bz2 |
Disk cache: Add support for having a sparse entry block that
is not totally filled. This is required to allow two
consecutive writes to fill a given range without caring
about the actual start offset of the second one (as long as
it is right where the first one ended).
This CL also takes care of all pending TODOs of the sparse
disk cache. Sparse disk cache support is now feature
complete.
BUG=12258
TEST=unittests
Review URL: http://codereview.chromium.org/155590
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20988 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/rankings.h')
-rw-r--r-- | net/disk_cache/rankings.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/disk_cache/rankings.h b/net/disk_cache/rankings.h index 81567f0..0a8b113 100644 --- a/net/disk_cache/rankings.h +++ b/net/disk_cache/rankings.h @@ -95,7 +95,7 @@ class Rankings { List list; // Which entry was returned to the user. CacheRankingsBlock* nodes[3]; // Nodes on the first three lists. Rankings* my_rankings; - Iterator(Rankings* rankings) { + explicit Iterator(Rankings* rankings) { memset(this, 0, sizeof(Iterator)); my_rankings = rankings; } @@ -177,6 +177,9 @@ class Rankings { // Updates the iterators whenever node is being changed. void UpdateIterators(CacheRankingsBlock* node); + // Verifies that no iterator gets invalidated by changing a node. + void NotAnIterator(CacheRankingsBlock* node); + // Keeps track of the number of entries on a list. void IncrementCounter(List list); void DecrementCounter(List list); |