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

Side by Side Diff: webkit/fileapi/file_system_context.h

Issue 13811013: Refactor FileSystemMountPointProvider::CreateFileStream{Reader,Writer} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: conflict fix Created 7 years, 8 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_FILEAPI_FILE_SYSTEM_CONTEXT_H_ 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ 6 #define WEBKIT_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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // Creates new FileStreamReader instance to read a file pointed by the given 174 // Creates new FileStreamReader instance to read a file pointed by the given
175 // filesystem URL |url| starting from |offset|. |expected_modification_time| 175 // filesystem URL |url| starting from |offset|. |expected_modification_time|
176 // specifies the expected last modification if the value is non-null, the 176 // specifies the expected last modification if the value is non-null, the
177 // reader will check the underlying file's actual modification time to see if 177 // reader will check the underlying file's actual modification time to see if
178 // the file has been modified, and if it does any succeeding read operations 178 // the file has been modified, and if it does any succeeding read operations
179 // should fail with ERR_UPLOAD_FILE_CHANGED error. 179 // should fail with ERR_UPLOAD_FILE_CHANGED error.
180 // This method internally cracks the |url|, get an appropriate 180 // This method internally cracks the |url|, get an appropriate
181 // MountPointProvider for the URL and call the provider's CreateFileReader. 181 // MountPointProvider for the URL and call the provider's CreateFileReader.
182 // The resolved MountPointProvider could perform further specialization 182 // The resolved MountPointProvider could perform further specialization
183 // depending on the filesystem type pointed by the |url|. 183 // depending on the filesystem type pointed by the |url|.
184 webkit_blob::FileStreamReader* CreateFileStreamReader( 184 scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader(
185 const FileSystemURL& url, 185 const FileSystemURL& url,
186 int64 offset, 186 int64 offset,
187 const base::Time& expected_modification_time); 187 const base::Time& expected_modification_time);
188 188
189 // Creates new FileStreamWriter instance to write into a file pointed by 189 // Creates new FileStreamWriter instance to write into a file pointed by
190 // |url| from |offset|. 190 // |url| from |offset|.
191 FileStreamWriter* CreateFileStreamWriter( 191 scoped_ptr<FileStreamWriter> CreateFileStreamWriter(
192 const FileSystemURL& url, 192 const FileSystemURL& url,
193 int64 offset); 193 int64 offset);
194 194
195 // Register a filesystem provider. The ownership of |provider| is 195 // Register a filesystem provider. The ownership of |provider| is
196 // transferred to this instance. 196 // transferred to this instance.
197 void RegisterMountPointProvider(FileSystemType type, 197 void RegisterMountPointProvider(FileSystemType type,
198 FileSystemMountPointProvider* provider); 198 FileSystemMountPointProvider* provider);
199 199
200 FileSystemTaskRunners* task_runners() { return task_runners_.get(); } 200 FileSystemTaskRunners* task_runners() { return task_runners_.get(); }
201 201
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 292
293 struct DefaultContextDeleter { 293 struct DefaultContextDeleter {
294 static void Destruct(const FileSystemContext* context) { 294 static void Destruct(const FileSystemContext* context) {
295 context->DeleteOnCorrectThread(); 295 context->DeleteOnCorrectThread();
296 } 296 }
297 }; 297 };
298 298
299 } // namespace fileapi 299 } // namespace fileapi
300 300
301 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ 301 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_
OLDNEW
« no previous file with comments | « webkit/chromeos/fileapi/cros_mount_point_provider.cc ('k') | webkit/fileapi/file_system_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698