| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_ASYNC_FILE_UTIL_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_ASYNC_FILE_UTIL_H_ |
| 6 #define WEBKIT_BROWSER_FILEAPI_ASYNC_FILE_UTIL_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_ASYNC_FILE_UTIL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 12 #include "base/files/file.h" | 12 #include "base/files/file.h" |
| 13 #include "base/files/file_util_proxy.h" | 13 #include "base/files/file_util_proxy.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "webkit/browser/fileapi/file_system_operation.h" | 15 #include "webkit/browser/fileapi/file_system_operation.h" |
| 16 #include "webkit/browser/webkit_storage_browser_export.h" | 16 #include "webkit/browser/storage_export.h" |
| 17 #include "webkit/common/fileapi/directory_entry.h" | 17 #include "webkit/common/fileapi/directory_entry.h" |
| 18 | 18 |
| 19 namespace base { | 19 namespace base { |
| 20 class Time; | 20 class Time; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace storage { | 23 namespace storage { |
| 24 class ShareableFileReference; | 24 class ShareableFileReference; |
| 25 } | 25 } |
| 26 | 26 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 const scoped_refptr<storage::ShareableFileReference>& file_ref)> | 77 const scoped_refptr<storage::ShareableFileReference>& file_ref)> |
| 78 CreateSnapshotFileCallback; | 78 CreateSnapshotFileCallback; |
| 79 | 79 |
| 80 typedef base::Callback<void(int64 size)> CopyFileProgressCallback; | 80 typedef base::Callback<void(int64 size)> CopyFileProgressCallback; |
| 81 | 81 |
| 82 typedef FileSystemOperation::CopyOrMoveOption CopyOrMoveOption; | 82 typedef FileSystemOperation::CopyOrMoveOption CopyOrMoveOption; |
| 83 | 83 |
| 84 // Creates an AsyncFileUtil instance which performs file operations on | 84 // Creates an AsyncFileUtil instance which performs file operations on |
| 85 // local native file system. The created instance assumes | 85 // local native file system. The created instance assumes |
| 86 // FileSystemURL::path() has the target platform path. | 86 // FileSystemURL::path() has the target platform path. |
| 87 WEBKIT_STORAGE_BROWSER_EXPORT static AsyncFileUtil* | 87 STORAGE_EXPORT static AsyncFileUtil* |
| 88 CreateForLocalFileSystem(); | 88 CreateForLocalFileSystem(); |
| 89 | 89 |
| 90 AsyncFileUtil() {} | 90 AsyncFileUtil() {} |
| 91 virtual ~AsyncFileUtil() {} | 91 virtual ~AsyncFileUtil() {} |
| 92 | 92 |
| 93 // Creates or opens a file with the given flags. | 93 // Creates or opens a file with the given flags. |
| 94 // If File::FLAG_CREATE is set in |file_flags| it always tries to create | 94 // If File::FLAG_CREATE is set in |file_flags| it always tries to create |
| 95 // a new file at the given |url| and calls back with | 95 // a new file at the given |url| and calls back with |
| 96 // File::FILE_ERROR_FILE_EXISTS if the |url| already exists. | 96 // File::FILE_ERROR_FILE_EXISTS if the |url| already exists. |
| 97 // | 97 // |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 const FileSystemURL& url, | 357 const FileSystemURL& url, |
| 358 const CreateSnapshotFileCallback& callback) = 0; | 358 const CreateSnapshotFileCallback& callback) = 0; |
| 359 | 359 |
| 360 private: | 360 private: |
| 361 DISALLOW_COPY_AND_ASSIGN(AsyncFileUtil); | 361 DISALLOW_COPY_AND_ASSIGN(AsyncFileUtil); |
| 362 }; | 362 }; |
| 363 | 363 |
| 364 } // namespace storage | 364 } // namespace storage |
| 365 | 365 |
| 366 #endif // WEBKIT_BROWSER_FILEAPI_ASYNC_FILE_UTIL_H_ | 366 #endif // WEBKIT_BROWSER_FILEAPI_ASYNC_FILE_UTIL_H_ |
| OLD | NEW |