Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1409)

Unified Diff: webkit/browser/fileapi/file_system_backend.h

Issue 470323003: [fsp] Improve performance for reading small chunks of data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698