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

Side by Side Diff: webkit/browser/fileapi/file_system_context.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_ 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_
6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_ 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 // Creates new FileStreamReader instance to read a file pointed by the given 244 // Creates new FileStreamReader instance to read a file pointed by the given
245 // filesystem URL |url| starting from |offset|. |expected_modification_time| 245 // filesystem URL |url| starting from |offset|. |expected_modification_time|
246 // specifies the expected last modification if the value is non-null, the 246 // specifies the expected last modification if the value is non-null, the
247 // reader will check the underlying file's actual modification time to see if 247 // reader will check the underlying file's actual modification time to see if
248 // the file has been modified, and if it does any succeeding read operations 248 // the file has been modified, and if it does any succeeding read operations
249 // should fail with ERR_UPLOAD_FILE_CHANGED error. 249 // should fail with ERR_UPLOAD_FILE_CHANGED error.
250 // This method internally cracks the |url|, get an appropriate 250 // This method internally cracks the |url|, get an appropriate
251 // FileSystemBackend for the URL and call the backend's CreateFileReader. 251 // FileSystemBackend for the URL and call the backend's CreateFileReader.
252 // The resolved FileSystemBackend could perform further specialization 252 // The resolved FileSystemBackend could perform further specialization
253 // depending on the filesystem type pointed by the |url|. 253 // depending on the filesystem type pointed by the |url|.
254 // At most |limit| bytes can be fetched from the file stream reader.
254 scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( 255 scoped_ptr<storage::FileStreamReader> CreateFileStreamReader(
255 const FileSystemURL& url, 256 const FileSystemURL& url,
256 int64 offset, 257 int64 offset,
258 int64 limit,
257 const base::Time& expected_modification_time); 259 const base::Time& expected_modification_time);
258 260
259 // Creates new FileStreamWriter instance to write into a file pointed by 261 // Creates new FileStreamWriter instance to write into a file pointed by
260 // |url| from |offset|. 262 // |url| from |offset|.
261 scoped_ptr<FileStreamWriter> CreateFileStreamWriter( 263 scoped_ptr<FileStreamWriter> CreateFileStreamWriter(
262 const FileSystemURL& url, 264 const FileSystemURL& url,
263 int64 offset); 265 int64 offset);
264 266
265 // Creates a new FileSystemOperationRunner. 267 // Creates a new FileSystemOperationRunner.
266 scoped_ptr<FileSystemOperationRunner> CreateFileSystemOperationRunner(); 268 scoped_ptr<FileSystemOperationRunner> CreateFileSystemOperationRunner();
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 420
419 struct DefaultContextDeleter { 421 struct DefaultContextDeleter {
420 static void Destruct(const FileSystemContext* context) { 422 static void Destruct(const FileSystemContext* context) {
421 context->DeleteOnCorrectThread(); 423 context->DeleteOnCorrectThread();
422 } 424 }
423 }; 425 };
424 426
425 } // namespace storage 427 } // namespace storage
426 428
427 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_ 429 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698