summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/block_files.h
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-28 00:35:25 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-28 00:35:25 +0000
commit5c0767d1facaf222cd17956fdf40618173f46a0e (patch)
tree0a2d3c5895d40e65a12f71545cc640959a6c91fb /net/disk_cache/block_files.h
parentad3d2542c02e8a3dba898d5bcf434d301b0862cf (diff)
downloadchromium_src-5c0767d1facaf222cd17956fdf40618173f46a0e.zip
chromium_src-5c0767d1facaf222cd17956fdf40618173f46a0e.tar.gz
chromium_src-5c0767d1facaf222cd17956fdf40618173f46a0e.tar.bz2
Disk Cache: Delete chained block files when they become empty.
We were leaving empty block files in the chain, and worst of all, not reusing them because we were thinking that these files were "almost full". Now we also check for empty files when the cache starts. BUG=16740 TEST=unittest. Review URL: http://codereview.chromium.org/159451 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21762 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/block_files.h')
-rw-r--r--net/disk_cache/block_files.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/disk_cache/block_files.h b/net/disk_cache/block_files.h
index 1572baf..790cc7d 100644
--- a/net/disk_cache/block_files.h
+++ b/net/disk_cache/block_files.h
@@ -61,6 +61,9 @@ class BlockFiles {
// Creates an empty block file and returns its index.
int CreateNextBlockFile(FileType block_type);
+ // Removes a chained block file that is now empty.
+ void RemoveEmptyFile(FileType block_type);
+
// Restores the header of a potentially inconsistent file.
bool FixBlockFileHeader(MappedFile* file);