| 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_FILE_SYSTEM_FILE_UTIL_PROXY_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_PROXY_H_ |
| 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_PROXY_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_PROXY_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/files/file_util_proxy.h" | 10 #include "base/files/file_util_proxy.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 typedef base::Callback<void(base::PlatformFileError status)> StatusCallback; | 31 typedef base::Callback<void(base::PlatformFileError status)> StatusCallback; |
| 32 typedef base::Callback<void(base::PlatformFileError status, | 32 typedef base::Callback<void(base::PlatformFileError status, |
| 33 bool created)> EnsureFileExistsCallback; | 33 bool created)> EnsureFileExistsCallback; |
| 34 typedef FileSystemOperation::GetMetadataCallback GetFileInfoCallback; | 34 typedef FileSystemOperation::GetMetadataCallback GetFileInfoCallback; |
| 35 typedef FileSystemOperation::ReadDirectoryCallback ReadDirectoryCallback; | 35 typedef FileSystemOperation::ReadDirectoryCallback ReadDirectoryCallback; |
| 36 | 36 |
| 37 typedef base::Callback< | 37 typedef base::Callback< |
| 38 void(base::PlatformFileError result, | 38 void(base::PlatformFileError result, |
| 39 const base::PlatformFileInfo& file_info, | 39 const base::PlatformFileInfo& file_info, |
| 40 const FilePath& platform_path, | 40 const base::FilePath& platform_path, |
| 41 FileSystemFileUtil::SnapshotFilePolicy snapshot_policy)> | 41 FileSystemFileUtil::SnapshotFilePolicy snapshot_policy)> |
| 42 SnapshotFileCallback; | 42 SnapshotFileCallback; |
| 43 | 43 |
| 44 // Deletes a file on the given context's task_runner. | 44 // Deletes a file on the given context's task_runner. |
| 45 static bool DeleteFile( | 45 static bool DeleteFile( |
| 46 FileSystemOperationContext* context, | 46 FileSystemOperationContext* context, |
| 47 FileSystemFileUtil* file_util, | 47 FileSystemFileUtil* file_util, |
| 48 const FileSystemURL& url, | 48 const FileSystemURL& url, |
| 49 const StatusCallback& callback); | 49 const StatusCallback& callback); |
| 50 | 50 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 78 FileSystemFileUtil* file_util, | 78 FileSystemFileUtil* file_util, |
| 79 const FileSystemURL& src_url, | 79 const FileSystemURL& src_url, |
| 80 const FileSystemURL& dest_url, | 80 const FileSystemURL& dest_url, |
| 81 const StatusCallback& callback); | 81 const StatusCallback& callback); |
| 82 | 82 |
| 83 // Copies a file from local disk to the given filesystem destination. | 83 // Copies a file from local disk to the given filesystem destination. |
| 84 // Primarily used for the Syncable filesystem type (e.g. GDrive). | 84 // Primarily used for the Syncable filesystem type (e.g. GDrive). |
| 85 static bool CopyInForeignFile( | 85 static bool CopyInForeignFile( |
| 86 FileSystemOperationContext* context, | 86 FileSystemOperationContext* context, |
| 87 FileSystemFileUtil* file_util, | 87 FileSystemFileUtil* file_util, |
| 88 const FilePath& src_local_disk_file_path, | 88 const base::FilePath& src_local_disk_file_path, |
| 89 const FileSystemURL& dest_url, | 89 const FileSystemURL& dest_url, |
| 90 const StatusCallback& callback); | 90 const StatusCallback& callback); |
| 91 | 91 |
| 92 // Ensures that the given |url| exist by calling |file_util|'s | 92 // Ensures that the given |url| exist by calling |file_util|'s |
| 93 // EnsureFileExists method on the given context's task_runner. | 93 // EnsureFileExists method on the given context's task_runner. |
| 94 static bool EnsureFileExists( | 94 static bool EnsureFileExists( |
| 95 FileSystemOperationContext* context, | 95 FileSystemOperationContext* context, |
| 96 FileSystemFileUtil* file_util, | 96 FileSystemFileUtil* file_util, |
| 97 const FileSystemURL& url, | 97 const FileSystemURL& url, |
| 98 const EnsureFileExistsCallback& callback); | 98 const EnsureFileExistsCallback& callback); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 int64 length, | 152 int64 length, |
| 153 const StatusCallback& callback); | 153 const StatusCallback& callback); |
| 154 | 154 |
| 155 private: | 155 private: |
| 156 DISALLOW_IMPLICIT_CONSTRUCTORS(FileSystemFileUtilProxy); | 156 DISALLOW_IMPLICIT_CONSTRUCTORS(FileSystemFileUtilProxy); |
| 157 }; | 157 }; |
| 158 | 158 |
| 159 } // namespace fileapi | 159 } // namespace fileapi |
| 160 | 160 |
| 161 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_PROXY_H_ | 161 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_PROXY_H_ |
| OLD | NEW |