summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/sparse_control.h
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-23 22:07:36 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-23 22:07:36 +0000
commit5e892c20535dcbeae099f92148feea8473cf1445 (patch)
treee8d81957e354d53c94a5f99f5eea3ca1fdb71ea7 /net/disk_cache/sparse_control.h
parent1ca4a8b5e7fea30a0cd7437000e8381002f546af (diff)
downloadchromium_src-5e892c20535dcbeae099f92148feea8473cf1445.zip
chromium_src-5e892c20535dcbeae099f92148feea8473cf1445.tar.gz
chromium_src-5e892c20535dcbeae099f92148feea8473cf1445.tar.bz2
Disk Cache: Implement GetAvailableRange for the regular disk cache.
This is required to enable sparse caching. BUG=12258 TEST=unittest Review URL: http://codereview.chromium.org/146005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19069 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/sparse_control.h')
-rw-r--r--net/disk_cache/sparse_control.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/disk_cache/sparse_control.h b/net/disk_cache/sparse_control.h
index fe65035..0c696ea 100644
--- a/net/disk_cache/sparse_control.h
+++ b/net/disk_cache/sparse_control.h
@@ -34,7 +34,8 @@ class SparseControl {
enum SparseOperation {
kNoOperation,
kReadOperation,
- kWriteOperation
+ kWriteOperation,
+ kGetRangeOperation
};
explicit SparseControl(EntryImpl* entry)
@@ -109,6 +110,9 @@ class SparseControl {
// work.
bool DoChildIO();
+ // Performs the required work for GetAvailableRange for one child.
+ int DoGetAvailableRange();
+
// Performs the required work after a single IO operations finishes.
void DoChildIOCompleted(int result);
@@ -124,6 +128,7 @@ class SparseControl {
bool pending_; // True if any child IO operation returned pending.
bool finished_;
bool init_;
+ bool range_found_; // True if GetAvailableRange found something.
SparseHeader sparse_header_; // Data about the children of entry_.
Bitmap children_map_; // The actual bitmap of children.