summaryrefslogtreecommitdiffstats
path: root/webkit/blob
diff options
context:
space:
mode:
authorhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-10 14:27:59 +0000
committerhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-10 14:27:59 +0000
commit59c51f15f2eaba24e3571e24a7302b0c8f963c40 (patch)
tree156c659e966a022ca4170e641bf41251c898f325 /webkit/blob
parentc204ff5c7869a0db2ecc9b9722aabe5b85e1d998 (diff)
downloadchromium_src-59c51f15f2eaba24e3571e24a7302b0c8f963c40.zip
chromium_src-59c51f15f2eaba24e3571e24a7302b0c8f963c40.tar.gz
chromium_src-59c51f15f2eaba24e3571e24a7302b0c8f963c40.tar.bz2
Add fileapi::FileSystemFileStreamReader::GetLength()
BUG=141835 TEST=content_unittests --gtest_filter="FileSystemURLRequestJobTest.*" Review URL: https://chromiumcodereview.appspot.com/11087048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161114 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/blob')
-rw-r--r--webkit/blob/file_stream_reader.h8
-rw-r--r--webkit/blob/local_file_stream_reader.h10
2 files changed, 10 insertions, 8 deletions
diff --git a/webkit/blob/file_stream_reader.h b/webkit/blob/file_stream_reader.h
index 83b8972..95e3571 100644
--- a/webkit/blob/file_stream_reader.h
+++ b/webkit/blob/file_stream_reader.h
@@ -38,6 +38,14 @@ class BLOB_EXPORT FileStreamReader {
// |callback| will not be called.
virtual int Read(net::IOBuffer* buf, int buf_len,
const net::CompletionCallback& callback) = 0;
+
+ // Returns the length of the file if it could successfully retrieve the
+ // file info *and* its last modification time equals to
+ // expected_modification_time_ (rv >= 0 cases).
+ // Otherwise, a negative error code is returned (rv < 0 cases).
+ // If the stream is deleted while it has an in-flight GetLength operation
+ // |callback| will not be called.
+ virtual int GetLength(const net::Int64CompletionCallback& callback) = 0;
};
} // namespace webkit_blob
diff --git a/webkit/blob/local_file_stream_reader.h b/webkit/blob/local_file_stream_reader.h
index 0e7d150..97e08fb 100644
--- a/webkit/blob/local_file_stream_reader.h
+++ b/webkit/blob/local_file_stream_reader.h
@@ -47,14 +47,8 @@ class BLOB_EXPORT LocalFileStreamReader : public FileStreamReader {
// FileStreamReader overrides.
virtual int Read(net::IOBuffer* buf, int buf_len,
const net::CompletionCallback& callback) OVERRIDE;
-
- // Returns the length of the file if it could successfully retrieve the
- // file info *and* its last modification time equals to
- // expected_modification_time_ (rv >= 0 cases).
- // Otherwise, a negative error code is returned (rv < 0 cases).
- // If the stream is deleted while it has an in-flight GetLength operation
- // |callback| will not be called.
- int GetLength(const net::Int64CompletionCallback& callback);
+ virtual int GetLength(
+ const net::Int64CompletionCallback& callback) OVERRIDE;
private:
int Open(const net::CompletionCallback& callback);