summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/mem_entry_impl.h
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-08 23:07:39 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-08 23:07:39 +0000
commit06e62baf611d6fca8698d50765bca81989155845 (patch)
tree5516ccda32e56e7dae301b8b30f5fd24a4c8b83c /net/disk_cache/mem_entry_impl.h
parent681d3b6b072e17a5de40be8794550f781bf28d87 (diff)
downloadchromium_src-06e62baf611d6fca8698d50765bca81989155845.zip
chromium_src-06e62baf611d6fca8698d50765bca81989155845.tar.gz
chromium_src-06e62baf611d6fca8698d50765bca81989155845.tar.bz2
Disk cache: Add a method to cancel pending sparse operations.
The sparse IO methods require exclusive use of the cache entry and they complain when that requirement is violated. When the user cancels a request and reissues another one to the same entry, we may be waiting for the previous operation to finish when we receive a new IO request, so we fail. This CL add a way for the HTTP cache to cancel IO operations and get a notification when the disk cache is able to operate on that entry again. BUG=23862 TEST=unittests Review URL: http://codereview.chromium.org/256090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28475 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/mem_entry_impl.h')
-rw-r--r--net/disk_cache/mem_entry_impl.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/disk_cache/mem_entry_impl.h b/net/disk_cache/mem_entry_impl.h
index 2463985..3eb1467 100644
--- a/net/disk_cache/mem_entry_impl.h
+++ b/net/disk_cache/mem_entry_impl.h
@@ -68,6 +68,8 @@ class MemEntryImpl : public Entry {
virtual int WriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
net::CompletionCallback* completion_callback);
virtual int GetAvailableRange(int64 offset, int len, int64* start);
+ virtual void CancelSparseIO() {}
+ virtual int ReadyForSparseIO(net::CompletionCallback* completion_callback);
// Performs the initialization of a EntryImpl that will be added to the
// cache.