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

Unified Diff: chrome/browser/chromeos/fileapi/file_system_backend.cc

Issue 470323003: [fsp] Improve performance for reading small chunks of data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. 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: chrome/browser/chromeos/fileapi/file_system_backend.cc
diff --git a/chrome/browser/chromeos/fileapi/file_system_backend.cc b/chrome/browser/chromeos/fileapi/file_system_backend.cc
index 52975e5ece3a58fe9f0af7af981e4f9dbeb57356..c17852ea99ae49e72bf9977639ad5773370d66fe 100644
--- a/chrome/browser/chromeos/fileapi/file_system_backend.cc
+++ b/chrome/browser/chromeos/fileapi/file_system_backend.cc
@@ -319,6 +319,7 @@ bool FileSystemBackend::HasInplaceCopyImplementation(
scoped_ptr<storage::FileStreamReader> FileSystemBackend::CreateFileStreamReader(
const storage::FileSystemURL& url,
int64 offset,
+ int64 max_bytes_to_read,
const base::Time& expected_modification_time,
storage::FileSystemContext* context) const {
DCHECK(url.is_valid());
@@ -329,10 +330,10 @@ scoped_ptr<storage::FileStreamReader> FileSystemBackend::CreateFileStreamReader(
switch (url.type()) {
case storage::kFileSystemTypeDrive:
return drive_delegate_->CreateFileStreamReader(
- url, offset, expected_modification_time, context);
+ url, offset, max_bytes_to_read, expected_modification_time, context);
case storage::kFileSystemTypeProvided:
return file_system_provider_delegate_->CreateFileStreamReader(
- url, offset, expected_modification_time, context);
+ url, offset, max_bytes_to_read, expected_modification_time, context);
case storage::kFileSystemTypeNativeLocal:
case storage::kFileSystemTypeRestrictedNativeLocal:
return scoped_ptr<storage::FileStreamReader>(
@@ -340,7 +341,7 @@ scoped_ptr<storage::FileStreamReader> FileSystemBackend::CreateFileStreamReader(
context, url, offset, expected_modification_time));
case storage::kFileSystemTypeDeviceMediaAsFileStorage:
return mtp_delegate_->CreateFileStreamReader(
- url, offset, expected_modification_time, context);
+ url, offset, max_bytes_to_read, expected_modification_time, context);
default:
NOTREACHED();
}

Powered by Google App Engine
This is Rietveld 408576698