OLD | NEW |
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 STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_RUNNER_H_ | 5 #ifndef STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_RUNNER_H_ |
6 #define STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_RUNNER_H_ | 6 #define STORAGE_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 30 matching lines...) Expand all Loading... |
41 typedef FileSystemOperation::ReadDirectoryCallback ReadDirectoryCallback; | 41 typedef FileSystemOperation::ReadDirectoryCallback ReadDirectoryCallback; |
42 typedef FileSystemOperation::SnapshotFileCallback SnapshotFileCallback; | 42 typedef FileSystemOperation::SnapshotFileCallback SnapshotFileCallback; |
43 typedef FileSystemOperation::StatusCallback StatusCallback; | 43 typedef FileSystemOperation::StatusCallback StatusCallback; |
44 typedef FileSystemOperation::WriteCallback WriteCallback; | 44 typedef FileSystemOperation::WriteCallback WriteCallback; |
45 typedef FileSystemOperation::OpenFileCallback OpenFileCallback; | 45 typedef FileSystemOperation::OpenFileCallback OpenFileCallback; |
46 typedef FileSystemOperation::ErrorBehavior ErrorBehavior; | 46 typedef FileSystemOperation::ErrorBehavior ErrorBehavior; |
47 typedef FileSystemOperation::CopyProgressCallback CopyProgressCallback; | 47 typedef FileSystemOperation::CopyProgressCallback CopyProgressCallback; |
48 typedef FileSystemOperation::CopyFileProgressCallback | 48 typedef FileSystemOperation::CopyFileProgressCallback |
49 CopyFileProgressCallback; | 49 CopyFileProgressCallback; |
50 typedef FileSystemOperation::CopyOrMoveOption CopyOrMoveOption; | 50 typedef FileSystemOperation::CopyOrMoveOption CopyOrMoveOption; |
| 51 typedef FileSystemOperation::GetMetadataField GetMetadataField; |
51 | 52 |
52 typedef int OperationID; | 53 typedef int OperationID; |
53 | 54 |
54 virtual ~FileSystemOperationRunner(); | 55 virtual ~FileSystemOperationRunner(); |
55 | 56 |
56 // Cancels all inflight operations. | 57 // Cancels all inflight operations. |
57 void Shutdown(); | 58 void Shutdown(); |
58 | 59 |
59 // Creates a file at |url|. If |exclusive| is true, an error is raised | 60 // Creates a file at |url|. If |exclusive| is true, an error is raised |
60 // in case a file is already present at the URL. | 61 // in case a file is already present at the URL. |
(...skipping 30 matching lines...) Expand all Loading... |
91 // Checks if a directory is present at |url|. | 92 // Checks if a directory is present at |url|. |
92 OperationID DirectoryExists(const FileSystemURL& url, | 93 OperationID DirectoryExists(const FileSystemURL& url, |
93 const StatusCallback& callback); | 94 const StatusCallback& callback); |
94 | 95 |
95 // Checks if a file is present at |url|. | 96 // Checks if a file is present at |url|. |
96 OperationID FileExists(const FileSystemURL& url, | 97 OperationID FileExists(const FileSystemURL& url, |
97 const StatusCallback& callback); | 98 const StatusCallback& callback); |
98 | 99 |
99 // Gets the metadata of a file or directory at |url|. | 100 // Gets the metadata of a file or directory at |url|. |
100 OperationID GetMetadata(const FileSystemURL& url, | 101 OperationID GetMetadata(const FileSystemURL& url, |
| 102 int fields, |
101 const GetMetadataCallback& callback); | 103 const GetMetadataCallback& callback); |
102 | 104 |
103 // Reads contents of a directory at |url|. | 105 // Reads contents of a directory at |url|. |
104 OperationID ReadDirectory(const FileSystemURL& url, | 106 OperationID ReadDirectory(const FileSystemURL& url, |
105 const ReadDirectoryCallback& callback); | 107 const ReadDirectoryCallback& callback); |
106 | 108 |
107 // Removes a file or directory at |url|. If |recursive| is true, remove | 109 // Removes a file or directory at |url|. If |recursive| is true, remove |
108 // all files and directories under the directory at |url| recursively. | 110 // all files and directories under the directory at |url| recursively. |
109 OperationID Remove(const FileSystemURL& url, bool recursive, | 111 OperationID Remove(const FileSystemURL& url, bool recursive, |
110 const StatusCallback& callback); | 112 const StatusCallback& callback); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 | 317 |
316 // Callbacks for stray cancels whose target operation is already finished. | 318 // Callbacks for stray cancels whose target operation is already finished. |
317 std::map<OperationID, StatusCallback> stray_cancel_callbacks_; | 319 std::map<OperationID, StatusCallback> stray_cancel_callbacks_; |
318 | 320 |
319 DISALLOW_COPY_AND_ASSIGN(FileSystemOperationRunner); | 321 DISALLOW_COPY_AND_ASSIGN(FileSystemOperationRunner); |
320 }; | 322 }; |
321 | 323 |
322 } // namespace storage | 324 } // namespace storage |
323 | 325 |
324 #endif // STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_RUNNER_H_ | 326 #endif // STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_RUNNER_H_ |
OLD | NEW |