summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/mem_entry_impl.cc
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-01 22:09:21 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-01 22:09:21 +0000
commit8f28d63586a48273a6e05bba97e3cb7d5c5d8cb0 (patch)
tree9a17cfd0ff4d0557d665f8ba5c6856f3dd4a6000 /net/disk_cache/mem_entry_impl.cc
parent406017c4dd6fe0a2d4680e319256fd898ef86e7d (diff)
downloadchromium_src-8f28d63586a48273a6e05bba97e3cb7d5c5d8cb0.zip
chromium_src-8f28d63586a48273a6e05bba97e3cb7d5c5d8cb0.tar.gz
chromium_src-8f28d63586a48273a6e05bba97e3cb7d5c5d8cb0.tar.bz2
Handle reading to the end of a sparse entry
TEST=run chrome with --enable-byte-range-support --incognito and watch a video in http://tinyvid.tv/, seeking should be fine. http_cache::PartialData used to read a length of zero when reading has reached the end. The zero parameter will cause MemEntryImpl to complain about invalid argument, so early return for the case that we know we have nothing to read. Review URL: http://codereview.chromium.org/255034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27776 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/mem_entry_impl.cc')
-rw-r--r--net/disk_cache/mem_entry_impl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/disk_cache/mem_entry_impl.cc b/net/disk_cache/mem_entry_impl.cc
index dcab54b..17eb65f 100644
--- a/net/disk_cache/mem_entry_impl.cc
+++ b/net/disk_cache/mem_entry_impl.cc
@@ -168,7 +168,7 @@ int MemEntryImpl::ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
if (!InitSparseInfo())
return net::ERR_CACHE_OPERATION_NOT_SUPPORTED;
- if (offset < 0 || buf_len < 0 || !buf_len)
+ if (offset < 0 || buf_len < 0)
return net::ERR_INVALID_ARGUMENT;
// We will keep using this buffer and adjust the offset in this buffer.