summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/disk_cache.h
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-11 17:16:48 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-11 17:16:48 +0000
commit034740aad9bf9e187d92b048a3c5c269673a3741 (patch)
treea7a5201619749081305e94c901405093935fb804 /net/disk_cache/disk_cache.h
parent183e2f015c27f84cba7972ba978ee96447abd3fc (diff)
downloadchromium_src-034740aad9bf9e187d92b048a3c5c269673a3741.zip
chromium_src-034740aad9bf9e187d92b048a3c5c269673a3741.tar.gz
chromium_src-034740aad9bf9e187d92b048a3c5c269673a3741.tar.bz2
Http Cache: Remove blocking calls to GetAvailableRange.
This seems to be the last piece of the http cache code that should be upgraded to non-blocking APIs. BUG=26729 TEST=unittests Review URL: http://codereview.chromium.org/2663003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49542 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/disk_cache.h')
-rw-r--r--net/disk_cache/disk_cache.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/disk_cache/disk_cache.h b/net/disk_cache/disk_cache.h
index fab9c91..36151ad 100644
--- a/net/disk_cache/disk_cache.h
+++ b/net/disk_cache/disk_cache.h
@@ -331,6 +331,16 @@ class Entry {
virtual int GetAvailableRange(int64 offset, int len, int64* start,
CompletionCallback* callback) = 0;
+ // Returns true if this entry could be a sparse entry or false otherwise. This
+ // is a quick test that may return true even if the entry is not really
+ // sparse. This method doesn't modify the state of this entry (it will not
+ // create sparse tracking data). GetAvailableRange or ReadSparseData can be
+ // used to perfom a definitive test of wether an existing entry is sparse or
+ // not, but that method may modify the current state of the entry (making it
+ // sparse, for instance). The purpose of this method is to test an existing
+ // entry, but without generating actual IO to perform a thorough check.
+ virtual bool CouldBeSparse() const = 0;
+
// Cancels any pending sparse IO operation (if any). The completion callback
// of the operation in question will still be called when the operation
// finishes, but the operation will finish sooner when this method is used.