Chromium Code Reviews| Index: webkit/browser/fileapi/file_system_backend.h |
| diff --git a/webkit/browser/fileapi/file_system_backend.h b/webkit/browser/fileapi/file_system_backend.h |
| index b71c8cab06d7fce114b06a3ade098dff8084f165..b6c83095f922d7d9727bc27b92f7551acf6bf9d8 100644 |
| --- a/webkit/browser/fileapi/file_system_backend.h |
| +++ b/webkit/browser/fileapi/file_system_backend.h |
| @@ -35,6 +35,10 @@ class FileSystemOperation; |
| class FileSystemQuotaUtil; |
| class WatcherManager; |
| +// Maximum value of length arguments used for |
| +// FileSystemBackend::CreateFileStreamReader(). |
| +const int64 kMaximumLength = std::numeric_limits<int64>::max(); |
|
hashimoto
2014/09/04 11:21:25
Why is this constant needed?
mtomasz
2014/09/05 01:04:40
Having a call:
new FileStreamReader(0, kMaximumLe
|
| + |
| // An interface for defining a file system backend. |
| // |
| // NOTE: when you implement a new FileSystemBackend for your own |
| @@ -108,12 +112,12 @@ class STORAGE_EXPORT FileSystemBackend { |
| // if it does any succeeding read operations should fail with |
| // ERR_UPLOAD_FILE_CHANGED error. |
| // This method itself does *not* check if the given path exists and is a |
| - // regular file. |
| - // The |length| argument says how many bytes are going to be read using the |
| - // instance of the file stream reader. If unknown, then equal to -1. |
| + // regular file. At most |limit| bytes can be fetched from the file stream |
| + // reader. |
| virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( |
| const FileSystemURL& url, |
| int64 offset, |
| + int64 limit, |
|
hashimoto
2014/09/04 11:21:25
It's not unclear from the word |limit| if this val
mtomasz
2014/09/05 01:04:40
This naming OFFSET and LIMIT is used widely in dat
|
| const base::Time& expected_modification_time, |
| FileSystemContext* context) const = 0; |