OLD | NEW |
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_LOCAL_FILE_SYSTEM_OPERATION_H_ | 5 #ifndef WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_OPERATION_H_ |
6 #define WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_OPERATION_H_ | 6 #define WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_OPERATION_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "webkit/fileapi/file_snapshot_policy.h" | 12 #include "webkit/blob/scoped_file.h" |
13 #include "webkit/fileapi/file_system_operation.h" | 13 #include "webkit/fileapi/file_system_operation.h" |
14 #include "webkit/fileapi/file_system_url.h" | 14 #include "webkit/fileapi/file_system_url.h" |
15 #include "webkit/fileapi/file_writer_delegate.h" | 15 #include "webkit/fileapi/file_writer_delegate.h" |
16 #include "webkit/quota/quota_types.h" | 16 #include "webkit/quota/quota_types.h" |
17 #include "webkit/storage/webkit_storage_export.h" | 17 #include "webkit/storage/webkit_storage_export.h" |
18 | 18 |
19 namespace chromeos { | 19 namespace chromeos { |
20 class CrosMountPointProvider; | 20 class CrosMountPointProvider; |
21 } | 21 } |
22 | 22 |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 int64 bytes, | 274 int64 bytes, |
275 FileWriterDelegate::WriteProgressStatus write_status); | 275 FileWriterDelegate::WriteProgressStatus write_status); |
276 void DidTouchFile(const StatusCallback& callback, | 276 void DidTouchFile(const StatusCallback& callback, |
277 base::PlatformFileError rv); | 277 base::PlatformFileError rv); |
278 void DidOpenFile(const OpenFileCallback& callback, | 278 void DidOpenFile(const OpenFileCallback& callback, |
279 base::PlatformFileError rv, | 279 base::PlatformFileError rv, |
280 base::PassPlatformFile file, | 280 base::PassPlatformFile file, |
281 bool created); | 281 bool created); |
282 void DidCreateSnapshotFile( | 282 void DidCreateSnapshotFile( |
283 const SnapshotFileCallback& callback, | 283 const SnapshotFileCallback& callback, |
284 base::PlatformFileError rv, | 284 base::PlatformFileError result, |
285 const base::PlatformFileInfo& file_info, | 285 const base::PlatformFileInfo& file_info, |
286 const base::FilePath& platform_path, | 286 const base::FilePath& platform_path, |
287 SnapshotFilePolicy snapshot_policy); | 287 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref); |
288 | 288 |
289 // Checks the validity of a given |url| and populates |file_util| for |mode|. | 289 // Checks the validity of a given |url| and populates |file_util| for |mode|. |
290 base::PlatformFileError SetUp( | 290 base::PlatformFileError SetUp( |
291 const FileSystemURL& url, | 291 const FileSystemURL& url, |
292 OperationMode mode); | 292 OperationMode mode); |
293 | 293 |
294 // Used only for internal assertions. | 294 // Used only for internal assertions. |
295 // Returns false if there's another inflight pending operation. | 295 // Returns false if there's another inflight pending operation. |
296 bool SetPendingOperationType(OperationType type); | 296 bool SetPendingOperationType(OperationType type); |
297 | 297 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 // LocalFileSystemOperation instance is usually deleted upon completion but | 333 // LocalFileSystemOperation instance is usually deleted upon completion but |
334 // could be deleted while it has inflight callbacks when Cancel is called. | 334 // could be deleted while it has inflight callbacks when Cancel is called. |
335 base::WeakPtrFactory<LocalFileSystemOperation> weak_factory_; | 335 base::WeakPtrFactory<LocalFileSystemOperation> weak_factory_; |
336 | 336 |
337 DISALLOW_COPY_AND_ASSIGN(LocalFileSystemOperation); | 337 DISALLOW_COPY_AND_ASSIGN(LocalFileSystemOperation); |
338 }; | 338 }; |
339 | 339 |
340 } // namespace fileapi | 340 } // namespace fileapi |
341 | 341 |
342 #endif // WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_OPERATION_H_ | 342 #endif // WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_OPERATION_H_ |
OLD | NEW |