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_BROWSER_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_ |
6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_ |
7 | 7 |
8 #include "base/files/file.h" | 8 #include "base/files/file.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "webkit/browser/fileapi/file_system_operation.h" | 11 #include "webkit/browser/fileapi/file_system_operation.h" |
12 #include "webkit/browser/webkit_storage_browser_export.h" | 12 #include "webkit/browser/webkit_storage_browser_export.h" |
13 #include "webkit/common/blob/scoped_file.h" | 13 #include "webkit/common/blob/scoped_file.h" |
14 | 14 |
15 namespace base { | 15 namespace base { |
16 class Time; | 16 class Time; |
17 } | 17 } |
18 | 18 |
19 namespace fileapi { | 19 namespace storage { |
20 | 20 |
21 class FileSystemOperationContext; | 21 class FileSystemOperationContext; |
22 class FileSystemURL; | 22 class FileSystemURL; |
23 | 23 |
24 // A file utility interface that provides basic file utility methods for | 24 // A file utility interface that provides basic file utility methods for |
25 // FileSystem API. | 25 // FileSystem API. |
26 // | 26 // |
27 // Layering structure of the FileSystemFileUtil was split out. | 27 // Layering structure of the FileSystemFileUtil was split out. |
28 // See http://crbug.com/128136 if you need it. | 28 // See http://crbug.com/128136 if you need it. |
29 class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemFileUtil { | 29 class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemFileUtil { |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 // See header comments for AsyncFileUtil::DeleteDirectory() for more details. | 160 // See header comments for AsyncFileUtil::DeleteDirectory() for more details. |
161 virtual base::File::Error DeleteDirectory( | 161 virtual base::File::Error DeleteDirectory( |
162 FileSystemOperationContext* context, | 162 FileSystemOperationContext* context, |
163 const FileSystemURL& url) = 0; | 163 const FileSystemURL& url) = 0; |
164 | 164 |
165 // Creates a local snapshot file for a given |url| and returns the | 165 // Creates a local snapshot file for a given |url| and returns the |
166 // metadata and platform path of the snapshot file via |callback|. | 166 // metadata and platform path of the snapshot file via |callback|. |
167 // | 167 // |
168 // See header comments for AsyncFileUtil::CreateSnapshotFile() for | 168 // See header comments for AsyncFileUtil::CreateSnapshotFile() for |
169 // more details. | 169 // more details. |
170 virtual webkit_blob::ScopedFile CreateSnapshotFile( | 170 virtual storage::ScopedFile CreateSnapshotFile( |
171 FileSystemOperationContext* context, | 171 FileSystemOperationContext* context, |
172 const FileSystemURL& url, | 172 const FileSystemURL& url, |
173 base::File::Error* error, | 173 base::File::Error* error, |
174 base::File::Info* file_info, | 174 base::File::Info* file_info, |
175 base::FilePath* platform_path) = 0; | 175 base::FilePath* platform_path) = 0; |
176 | 176 |
177 protected: | 177 protected: |
178 FileSystemFileUtil() {} | 178 FileSystemFileUtil() {} |
179 | 179 |
180 private: | 180 private: |
181 DISALLOW_COPY_AND_ASSIGN(FileSystemFileUtil); | 181 DISALLOW_COPY_AND_ASSIGN(FileSystemFileUtil); |
182 }; | 182 }; |
183 | 183 |
184 } // namespace fileapi | 184 } // namespace storage |
185 | 185 |
186 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_ | 186 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_ |
OLD | NEW |