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

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: Fixed. 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..9fbdc359129701a523e191a87ef1e895e447a715 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
hashimoto 2014/09/05 03:17:27 There is no longer |length| argument.
mtomasz 2014/09/05 05:31:42 Done.
+// FileSystemBackend::CreateFileStreamReader().
+const int64 kMaximumLength = std::numeric_limits<int64>::max();
+
// 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 |max_bytes_to_read| can be fetched from the file
+ // stream reader.
virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader(
const FileSystemURL& url,
int64 offset,
+ int64 max_bytes_to_read,
const base::Time& expected_modification_time,
FileSystemContext* context) const = 0;

Powered by Google App Engine
This is Rietveld 408576698