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

Side by Side Diff: webkit/browser/fileapi/isolated_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: Fixed a dcheck. Created 6 years, 4 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 #include "webkit/browser/fileapi/isolated_file_system_backend.h" 5 #include "webkit/browser/fileapi/isolated_file_system_backend.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 fileapi::FileSystemType type) const { 109 fileapi::FileSystemType type) const {
110 DCHECK(type == kFileSystemTypeNativeLocal || type == kFileSystemTypeDragged || 110 DCHECK(type == kFileSystemTypeNativeLocal || type == kFileSystemTypeDragged ||
111 type == kFileSystemTypeForTransientFile); 111 type == kFileSystemTypeForTransientFile);
112 return false; 112 return false;
113 } 113 }
114 114
115 scoped_ptr<webkit_blob::FileStreamReader> 115 scoped_ptr<webkit_blob::FileStreamReader>
116 IsolatedFileSystemBackend::CreateFileStreamReader( 116 IsolatedFileSystemBackend::CreateFileStreamReader(
117 const FileSystemURL& url, 117 const FileSystemURL& url,
118 int64 offset, 118 int64 offset,
119 int64 length,
119 const base::Time& expected_modification_time, 120 const base::Time& expected_modification_time,
120 FileSystemContext* context) const { 121 FileSystemContext* context) const {
121 return scoped_ptr<webkit_blob::FileStreamReader>( 122 return scoped_ptr<webkit_blob::FileStreamReader>(
122 webkit_blob::FileStreamReader::CreateForLocalFile( 123 webkit_blob::FileStreamReader::CreateForLocalFile(
123 context->default_file_task_runner(), 124 context->default_file_task_runner(),
124 url.path(), offset, expected_modification_time)); 125 url.path(), offset, expected_modification_time));
125 } 126 }
126 127
127 scoped_ptr<FileStreamWriter> IsolatedFileSystemBackend::CreateFileStreamWriter( 128 scoped_ptr<FileStreamWriter> IsolatedFileSystemBackend::CreateFileStreamWriter(
128 const FileSystemURL& url, 129 const FileSystemURL& url,
129 int64 offset, 130 int64 offset,
130 FileSystemContext* context) const { 131 FileSystemContext* context) const {
131 return scoped_ptr<FileStreamWriter>( 132 return scoped_ptr<FileStreamWriter>(
132 FileStreamWriter::CreateForLocalFile( 133 FileStreamWriter::CreateForLocalFile(
133 context->default_file_task_runner(), 134 context->default_file_task_runner(),
134 url.path(), 135 url.path(),
135 offset, 136 offset,
136 FileStreamWriter::OPEN_EXISTING_FILE)); 137 FileStreamWriter::OPEN_EXISTING_FILE));
137 } 138 }
138 139
139 FileSystemQuotaUtil* IsolatedFileSystemBackend::GetQuotaUtil() { 140 FileSystemQuotaUtil* IsolatedFileSystemBackend::GetQuotaUtil() {
140 // No quota support. 141 // No quota support.
141 return NULL; 142 return NULL;
142 } 143 }
143 144
144 } // namespace fileapi 145 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698