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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 bool created | 44 bool created |
45 )> EnsureFileExistsCallback; | 45 )> EnsureFileExistsCallback; |
46 typedef base::Callback<void(PlatformFileError status, | 46 typedef base::Callback<void(PlatformFileError status, |
47 const PlatformFileInfo& info, | 47 const PlatformFileInfo& info, |
48 const FilePath& platform_path | 48 const FilePath& platform_path |
49 )> GetFileInfoCallback; | 49 )> GetFileInfoCallback; |
50 typedef base::Callback<void(PlatformFileError, | 50 typedef base::Callback<void(PlatformFileError, |
51 const std::vector<Entry>&, | 51 const std::vector<Entry>&, |
52 bool has_more)> ReadDirectoryCallback; | 52 bool has_more)> ReadDirectoryCallback; |
53 | 53 |
54 // Deletes a file or a directory by calling |file_util|'s | 54 // Deletes a file or a directory on the given |message_loop_proxy|. |
55 // Delete method on the given |message_loop_proxy|. | 55 // It is an error to delete a non-empty directory with recursive=false. |
56 static bool Delete( | 56 static bool Delete( |
57 MessageLoopProxy* message_loop_proxy, | 57 MessageLoopProxy* message_loop_proxy, |
58 FileSystemOperationContext* context, | 58 FileSystemOperationContext* context, |
59 FileSystemFileUtil* file_util, | 59 FileSystemFileUtil* file_util, |
60 const FileSystemPath& path, | 60 const FileSystemPath& path, |
61 bool recursive, | 61 bool recursive, |
62 const StatusCallback& callback); | 62 const StatusCallback& callback); |
63 | 63 |
64 // Creates or opens a file with the given flags by calling |file_util|'s | 64 // Creates or opens a file with the given flags by calling |file_util|'s |
65 // CreateOrOpen method on the given |message_loop_proxy|. | 65 // CreateOrOpen method on the given |message_loop_proxy|. |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 int64 length, | 167 int64 length, |
168 const StatusCallback& callback); | 168 const StatusCallback& callback); |
169 | 169 |
170 private: | 170 private: |
171 DISALLOW_IMPLICIT_CONSTRUCTORS(FileSystemFileUtilProxy); | 171 DISALLOW_IMPLICIT_CONSTRUCTORS(FileSystemFileUtilProxy); |
172 }; | 172 }; |
173 | 173 |
174 } // namespace fileapi | 174 } // namespace fileapi |
175 | 175 |
176 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_PROXY_H_ | 176 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_PROXY_H_ |
OLD | NEW |