OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_OPERATION_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // operation. If it is given it will not be overwritten by the class. | 113 // operation. If it is given it will not be overwritten by the class. |
114 void set_override_file_util(FileSystemFileUtil* file_util) { | 114 void set_override_file_util(FileSystemFileUtil* file_util) { |
115 operation_context_.set_src_file_util(file_util); | 115 operation_context_.set_src_file_util(file_util); |
116 operation_context_.set_dest_file_util(file_util); | 116 operation_context_.set_dest_file_util(file_util); |
117 } | 117 } |
118 | 118 |
119 void GetUsageAndQuotaThenCallback( | 119 void GetUsageAndQuotaThenCallback( |
120 const GURL& origin_url, | 120 const GURL& origin_url, |
121 const quota::QuotaManager::GetUsageAndQuotaCallback& callback); | 121 const quota::QuotaManager::GetUsageAndQuotaCallback& callback); |
122 | 122 |
123 void DelayedCreateFileForQuota(quota::QuotaStatusCode status, | 123 void DelayedCreateFileForQuota(bool exclusive, |
| 124 quota::QuotaStatusCode status, |
124 int64 usage, int64 quota); | 125 int64 usage, int64 quota); |
125 void DelayedCreateDirectoryForQuota(quota::QuotaStatusCode status, | 126 void DelayedCreateDirectoryForQuota(bool exclusive, bool recursive, |
| 127 quota::QuotaStatusCode status, |
126 int64 usage, int64 quota); | 128 int64 usage, int64 quota); |
127 void DelayedCopyForQuota(quota::QuotaStatusCode status, | 129 void DelayedCopyForQuota(quota::QuotaStatusCode status, |
128 int64 usage, int64 quota); | 130 int64 usage, int64 quota); |
129 void DelayedMoveForQuota(quota::QuotaStatusCode status, | 131 void DelayedMoveForQuota(quota::QuotaStatusCode status, |
130 int64 usage, int64 quota); | 132 int64 usage, int64 quota); |
131 void DelayedWriteForQuota(quota::QuotaStatusCode status, | 133 void DelayedWriteForQuota(quota::QuotaStatusCode status, |
132 int64 usage, int64 quota); | 134 int64 usage, int64 quota); |
133 void DelayedTruncateForQuota(quota::QuotaStatusCode status, | 135 void DelayedTruncateForQuota(int64 length, |
| 136 quota::QuotaStatusCode status, |
134 int64 usage, int64 quota); | 137 int64 usage, int64 quota); |
135 void DelayedOpenFileForQuota(quota::QuotaStatusCode status, | 138 void DelayedOpenFileForQuota(int file_flags, |
| 139 quota::QuotaStatusCode status, |
136 int64 usage, int64 quota); | 140 int64 usage, int64 quota); |
137 | 141 |
138 // A callback used for OpenFileSystem. | 142 // A callback used for OpenFileSystem. |
139 void DidGetRootPath(bool success, | 143 void DidGetRootPath(bool success, |
140 const FilePath& path, | 144 const FilePath& path, |
141 const std::string& name); | 145 const std::string& name); |
142 | 146 |
143 // Callback for CreateFile for |exclusive|=true cases. | 147 // Callback for CreateFile for |exclusive|=true cases. |
144 void DidEnsureFileExistsExclusive(base::PlatformFileError rv, | 148 void DidEnsureFileExistsExclusive(base::PlatformFileError rv, |
145 bool created); | 149 bool created); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 // Used only by OpenFile, in order to clone the file handle back to the | 272 // Used only by OpenFile, in order to clone the file handle back to the |
269 // requesting process. | 273 // requesting process. |
270 base::ProcessHandle peer_handle_; | 274 base::ProcessHandle peer_handle_; |
271 | 275 |
272 // Used to keep a virtual path around while we check for quota. | 276 // Used to keep a virtual path around while we check for quota. |
273 // If an operation needs only one path, use src_virtual_path_, even if it's a | 277 // If an operation needs only one path, use src_virtual_path_, even if it's a |
274 // write. | 278 // write. |
275 FilePath src_virtual_path_; | 279 FilePath src_virtual_path_; |
276 FilePath dest_virtual_path_; | 280 FilePath dest_virtual_path_; |
277 | 281 |
278 // Options for CreateFile and CreateDirectory. | |
279 bool exclusive_; | |
280 bool recursive_; | |
281 | |
282 // Options for OpenFile. | |
283 int file_flags_; | |
284 | |
285 // Length to be truncated. | |
286 int64 length_; | |
287 | |
288 DISALLOW_COPY_AND_ASSIGN(FileSystemOperation); | 282 DISALLOW_COPY_AND_ASSIGN(FileSystemOperation); |
289 }; | 283 }; |
290 | 284 |
291 } // namespace fileapi | 285 } // namespace fileapi |
292 | 286 |
293 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ | 287 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
OLD | NEW |