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

Side by Side Diff: chrome/browser/chromeos/fileapi/mtp_file_system_backend_delegate.cc

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/fileapi/mtp_file_system_backend_delegate.h" 5 #include "chrome/browser/chromeos/fileapi/mtp_file_system_backend_delegate.h"
6 #include "chrome/browser/media_galleries/fileapi/device_media_async_file_util.h" 6 #include "chrome/browser/media_galleries/fileapi/device_media_async_file_util.h"
7 #include "webkit/browser/blob/file_stream_reader.h" 7 #include "webkit/browser/blob/file_stream_reader.h"
8 #include "webkit/browser/fileapi/file_stream_writer.h" 8 #include "webkit/browser/fileapi/file_stream_writer.h"
9 #include "webkit/browser/fileapi/file_system_url.h" 9 #include "webkit/browser/fileapi/file_system_url.h"
10 10
(...skipping 13 matching lines...) Expand all
24 storage::FileSystemType type) { 24 storage::FileSystemType type) {
25 DCHECK_EQ(storage::kFileSystemTypeDeviceMediaAsFileStorage, type); 25 DCHECK_EQ(storage::kFileSystemTypeDeviceMediaAsFileStorage, type);
26 26
27 return device_media_async_file_util_.get(); 27 return device_media_async_file_util_.get();
28 } 28 }
29 29
30 scoped_ptr<storage::FileStreamReader> 30 scoped_ptr<storage::FileStreamReader>
31 MTPFileSystemBackendDelegate::CreateFileStreamReader( 31 MTPFileSystemBackendDelegate::CreateFileStreamReader(
32 const storage::FileSystemURL& url, 32 const storage::FileSystemURL& url,
33 int64 offset, 33 int64 offset,
34 int64 length,
34 const base::Time& expected_modification_time, 35 const base::Time& expected_modification_time,
35 storage::FileSystemContext* context) { 36 storage::FileSystemContext* context) {
36 DCHECK_EQ(storage::kFileSystemTypeDeviceMediaAsFileStorage, url.type()); 37 DCHECK_EQ(storage::kFileSystemTypeDeviceMediaAsFileStorage, url.type());
37 38
38 return device_media_async_file_util_->GetFileStreamReader( 39 return device_media_async_file_util_->GetFileStreamReader(
39 url, offset, expected_modification_time, context); 40 url, offset, expected_modification_time, context);
40 } 41 }
41 42
42 scoped_ptr<storage::FileStreamWriter> 43 scoped_ptr<storage::FileStreamWriter>
43 MTPFileSystemBackendDelegate::CreateFileStreamWriter( 44 MTPFileSystemBackendDelegate::CreateFileStreamWriter(
44 const storage::FileSystemURL& url, 45 const storage::FileSystemURL& url,
45 int64 offset, 46 int64 offset,
46 storage::FileSystemContext* context) { 47 storage::FileSystemContext* context) {
47 DCHECK_EQ(storage::kFileSystemTypeDeviceMediaAsFileStorage, url.type()); 48 DCHECK_EQ(storage::kFileSystemTypeDeviceMediaAsFileStorage, url.type());
48 49
49 // TODO(kinaba): support writing. 50 // TODO(kinaba): support writing.
50 return scoped_ptr<storage::FileStreamWriter>(); 51 return scoped_ptr<storage::FileStreamWriter>();
51 } 52 }
52 53
53 storage::WatcherManager* MTPFileSystemBackendDelegate::GetWatcherManager( 54 storage::WatcherManager* MTPFileSystemBackendDelegate::GetWatcherManager(
54 const storage::FileSystemURL& url) { 55 const storage::FileSystemURL& url) {
55 NOTIMPLEMENTED(); 56 NOTIMPLEMENTED();
56 return NULL; 57 return NULL;
57 } 58 }
58 59
59 } // namespace chromeos 60 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698