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

Side by Side Diff: webkit/browser/fileapi/file_system_operation_runner.h

Issue 318753007: Remove stale references to PlatformFile flags, errors or functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_OPERATION_RUNNER_H_ 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_RUNNER_H_
6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_RUNNER_H_ 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_RUNNER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // while in remote filesystem case the backend may want to download the file 154 // while in remote filesystem case the backend may want to download the file
155 // into a temporary snapshot file and return the metadata of the 155 // into a temporary snapshot file and return the metadata of the
156 // temporary file. Or if the implementaiton already has the local cache 156 // temporary file. Or if the implementaiton already has the local cache
157 // data for |url| it can simply return the url to the cache. 157 // data for |url| it can simply return the url to the cache.
158 OperationID CreateSnapshotFile(const FileSystemURL& url, 158 OperationID CreateSnapshotFile(const FileSystemURL& url,
159 const SnapshotFileCallback& callback); 159 const SnapshotFileCallback& callback);
160 160
161 // Copies in a single file from a different filesystem. 161 // Copies in a single file from a different filesystem.
162 // 162 //
163 // This returns: 163 // This returns:
164 // - PLATFORM_FILE_ERROR_NOT_FOUND if |src_file_path| 164 // - File::FILE_ERROR_NOT_FOUND if |src_file_path|
165 // or the parent directory of |dest_url| does not exist. 165 // or the parent directory of |dest_url| does not exist.
166 // - PLATFORM_FILE_ERROR_INVALID_OPERATION if |dest_url| exists and 166 // - File::FILE_ERROR_INVALID_OPERATION if |dest_url| exists and
167 // is not a file. 167 // is not a file.
168 // - PLATFORM_FILE_ERROR_FAILED if |dest_url| does not exist and 168 // - File::FILE_ERROR_FAILED if |dest_url| does not exist and
169 // its parent path is a file. 169 // its parent path is a file.
170 // 170 //
171 OperationID CopyInForeignFile(const base::FilePath& src_local_disk_path, 171 OperationID CopyInForeignFile(const base::FilePath& src_local_disk_path,
172 const FileSystemURL& dest_url, 172 const FileSystemURL& dest_url,
173 const StatusCallback& callback); 173 const StatusCallback& callback);
174 174
175 // Removes a single file. 175 // Removes a single file.
176 // 176 //
177 // This returns: 177 // This returns:
178 // - PLATFORM_FILE_ERROR_NOT_FOUND if |url| does not exist. 178 // - File::FILE_ERROR_NOT_FOUND if |url| does not exist.
179 // - PLATFORM_FILE_ERROR_NOT_A_FILE if |url| is not a file. 179 // - File::FILE_ERROR_NOT_A_FILE if |url| is not a file.
180 // 180 //
181 OperationID RemoveFile(const FileSystemURL& url, 181 OperationID RemoveFile(const FileSystemURL& url,
182 const StatusCallback& callback); 182 const StatusCallback& callback);
183 183
184 // Removes a single empty directory. 184 // Removes a single empty directory.
185 // 185 //
186 // This returns: 186 // This returns:
187 // - PLATFORM_FILE_ERROR_NOT_FOUND if |url| does not exist. 187 // - File::FILE_ERROR_NOT_FOUND if |url| does not exist.
188 // - PLATFORM_FILE_ERROR_NOT_A_DIRECTORY if |url| is not a directory. 188 // - File::FILE_ERROR_NOT_A_DIRECTORY if |url| is not a directory.
189 // - PLATFORM_FILE_ERROR_NOT_EMPTY if |url| is not empty. 189 // - File::FILE_ERROR_NOT_EMPTY if |url| is not empty.
190 // 190 //
191 OperationID RemoveDirectory(const FileSystemURL& url, 191 OperationID RemoveDirectory(const FileSystemURL& url,
192 const StatusCallback& callback); 192 const StatusCallback& callback);
193 193
194 // Copies a file from |src_url| to |dest_url|. 194 // Copies a file from |src_url| to |dest_url|.
195 // This must be called for files that belong to the same filesystem 195 // This must be called for files that belong to the same filesystem
196 // (i.e. type() and origin() of the |src_url| and |dest_url| must match). 196 // (i.e. type() and origin() of the |src_url| and |dest_url| must match).
197 // For |option| and |progress_callback|, see file_system_operation.h for 197 // For |option| and |progress_callback|, see file_system_operation.h for
198 // details. 198 // details.
199 // 199 //
200 // This returns: 200 // This returns:
201 // - PLATFORM_FILE_ERROR_NOT_FOUND if |src_url| 201 // - File::FILE_ERROR_NOT_FOUND if |src_url|
202 // or the parent directory of |dest_url| does not exist. 202 // or the parent directory of |dest_url| does not exist.
203 // - PLATFORM_FILE_ERROR_NOT_A_FILE if |src_url| exists but is not a file. 203 // - File::FILE_ERROR_NOT_A_FILE if |src_url| exists but is not a file.
204 // - PLATFORM_FILE_ERROR_INVALID_OPERATION if |dest_url| exists and 204 // - File::FILE_ERROR_INVALID_OPERATION if |dest_url| exists and
205 // is not a file. 205 // is not a file.
206 // - PLATFORM_FILE_ERROR_FAILED if |dest_url| does not exist and 206 // - File::FILE_ERROR_FAILED if |dest_url| does not exist and
207 // its parent path is a file. 207 // its parent path is a file.
208 // 208 //
209 OperationID CopyFileLocal(const FileSystemURL& src_url, 209 OperationID CopyFileLocal(const FileSystemURL& src_url,
210 const FileSystemURL& dest_url, 210 const FileSystemURL& dest_url,
211 CopyOrMoveOption option, 211 CopyOrMoveOption option,
212 const CopyFileProgressCallback& progress_callback, 212 const CopyFileProgressCallback& progress_callback,
213 const StatusCallback& callback); 213 const StatusCallback& callback);
214 214
215 // Moves a local file from |src_url| to |dest_url|. 215 // Moves a local file from |src_url| to |dest_url|.
216 // This must be called for files that belong to the same filesystem 216 // This must be called for files that belong to the same filesystem
217 // (i.e. type() and origin() of the |src_url| and |dest_url| must match). 217 // (i.e. type() and origin() of the |src_url| and |dest_url| must match).
218 // For |option|, see file_system_operation.h for details. 218 // For |option|, see file_system_operation.h for details.
219 // 219 //
220 // This returns: 220 // This returns:
221 // - PLATFORM_FILE_ERROR_NOT_FOUND if |src_url| 221 // - File::FILE_ERROR_NOT_FOUND if |src_url|
222 // or the parent directory of |dest_url| does not exist. 222 // or the parent directory of |dest_url| does not exist.
223 // - PLATFORM_FILE_ERROR_NOT_A_FILE if |src_url| exists but is not a file. 223 // - File::FILE_ERROR_NOT_A_FILE if |src_url| exists but is not a file.
224 // - PLATFORM_FILE_ERROR_INVALID_OPERATION if |dest_url| exists and 224 // - File::FILE_ERROR_INVALID_OPERATION if |dest_url| exists and
225 // is not a file. 225 // is not a file.
226 // - PLATFORM_FILE_ERROR_FAILED if |dest_url| does not exist and 226 // - File::FILE_ERROR_FAILED if |dest_url| does not exist and
227 // its parent path is a file. 227 // its parent path is a file.
228 // 228 //
229 OperationID MoveFileLocal(const FileSystemURL& src_url, 229 OperationID MoveFileLocal(const FileSystemURL& src_url,
230 const FileSystemURL& dest_url, 230 const FileSystemURL& dest_url,
231 CopyOrMoveOption option, 231 CopyOrMoveOption option,
232 const StatusCallback& callback); 232 const StatusCallback& callback);
233 233
234 // This is called only by pepper plugin as of writing to synchronously get 234 // This is called only by pepper plugin as of writing to synchronously get
235 // the underlying platform path to upload a file in the sandboxed filesystem 235 // the underlying platform path to upload a file in the sandboxed filesystem
236 // (e.g. TEMPORARY or PERSISTENT). 236 // (e.g. TEMPORARY or PERSISTENT).
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 313
314 // Callbacks for stray cancels whose target operation is already finished. 314 // Callbacks for stray cancels whose target operation is already finished.
315 std::map<OperationID, StatusCallback> stray_cancel_callbacks_; 315 std::map<OperationID, StatusCallback> stray_cancel_callbacks_;
316 316
317 DISALLOW_COPY_AND_ASSIGN(FileSystemOperationRunner); 317 DISALLOW_COPY_AND_ASSIGN(FileSystemOperationRunner);
318 }; 318 };
319 319
320 } // namespace fileapi 320 } // namespace fileapi
321 321
322 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_RUNNER_H_ 322 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_RUNNER_H_
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/file_system_file_util.h ('k') | webkit/browser/fileapi/recursive_operation_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698