OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_OBFUSCATED_FILE_SYSTEM_FILE_UTIL_H_ | 5 #ifndef WEBKIT_FILEAPI_OBFUSCATED_FILE_SYSTEM_FILE_UTIL_H_ |
6 #define WEBKIT_FILEAPI_OBFUSCATED_FILE_SYSTEM_FILE_UTIL_H_ | 6 #define WEBKIT_FILEAPI_OBFUSCATED_FILE_SYSTEM_FILE_UTIL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 const FilePath& root_path) OVERRIDE; | 184 const FilePath& root_path) OVERRIDE; |
185 | 185 |
186 // Deletes a directory database from the database list in the ObfuscatedFSFU | 186 // Deletes a directory database from the database list in the ObfuscatedFSFU |
187 // and destroys the database on the disk. | 187 // and destroys the database on the disk. |
188 bool DestroyDirectoryDatabase(const GURL& origin, FileSystemType type); | 188 bool DestroyDirectoryDatabase(const GURL& origin, FileSystemType type); |
189 | 189 |
190 private: | 190 private: |
191 typedef FileSystemDirectoryDatabase::FileId FileId; | 191 typedef FileSystemDirectoryDatabase::FileId FileId; |
192 typedef FileSystemDirectoryDatabase::FileInfo FileInfo; | 192 typedef FileSystemDirectoryDatabase::FileInfo FileInfo; |
193 | 193 |
| 194 base::PlatformFileError GetPlatformFileInfo( |
| 195 FileSystemOperationContext* context, |
| 196 FileId file_id, |
| 197 const FileInfo& local_info, |
| 198 base::PlatformFileInfo* file_info, |
| 199 FilePath* platform_file_path); |
| 200 |
194 // Creates a new file, both the underlying backing file and the entry in the | 201 // Creates a new file, both the underlying backing file and the entry in the |
195 // database. file_info is an in-out parameter. Supply the name and | 202 // database. file_info is an in-out parameter. Supply the name and |
196 // parent_id; data_path is ignored. On success, data_path will | 203 // parent_id; data_path is ignored. On success, data_path will |
197 // always be set to the relative path [from the root of the type-specific | 204 // always be set to the relative path [from the root of the type-specific |
198 // filesystem directory] of a NEW backing file, and handle, if supplied, will | 205 // filesystem directory] of a NEW backing file, and handle, if supplied, will |
199 // hold open PlatformFile for the backing file, which the caller is | 206 // hold open PlatformFile for the backing file, which the caller is |
200 // responsible for closing. If you supply a path in source_path, it will be | 207 // responsible for closing. If you supply a path in source_path, it will be |
201 // used as a source from which to COPY data. | 208 // used as a source from which to COPY data. |
202 // Caveat: do not supply handle if you're also supplying a data path. It was | 209 // Caveat: do not supply handle if you're also supplying a data path. It was |
203 // easier not to support this, and no code has needed it so far, so it will | 210 // easier not to support this, and no code has needed it so far, so it will |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 FilePath file_system_directory_; | 245 FilePath file_system_directory_; |
239 base::OneShotTimer<ObfuscatedFileSystemFileUtil> timer_; | 246 base::OneShotTimer<ObfuscatedFileSystemFileUtil> timer_; |
240 FileSystemFileUtil* underlying_file_util_; | 247 FileSystemFileUtil* underlying_file_util_; |
241 | 248 |
242 DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileSystemFileUtil); | 249 DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileSystemFileUtil); |
243 }; | 250 }; |
244 | 251 |
245 } // namespace fileapi | 252 } // namespace fileapi |
246 | 253 |
247 #endif // WEBKIT_FILEAPI_OBFUSCATED_FILE_SYSTEM_FILE_UTIL_H_ | 254 #endif // WEBKIT_FILEAPI_OBFUSCATED_FILE_SYSTEM_FILE_UTIL_H_ |
OLD | NEW |