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 GetFileInfoInternal( |
| 195 FileSystemDirectoryDatabase* db, |
| 196 FileSystemOperationContext* context, |
| 197 FileId file_id, |
| 198 FileInfo* local_info, |
| 199 base::PlatformFileInfo* file_info, |
| 200 FilePath* platform_file_path); |
| 201 |
194 // Creates a new file, both the underlying backing file and the entry in the | 202 // 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 | 203 // database. file_info is an in-out parameter. Supply the name and |
196 // parent_id; data_path is ignored. On success, data_path will | 204 // 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 | 205 // 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 | 206 // filesystem directory] of a NEW backing file, and handle, if supplied, will |
199 // hold open PlatformFile for the backing file, which the caller is | 207 // 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 | 208 // responsible for closing. If you supply a path in source_path, it will be |
201 // used as a source from which to COPY data. | 209 // 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 | 210 // 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 | 211 // 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_; | 246 FilePath file_system_directory_; |
239 base::OneShotTimer<ObfuscatedFileSystemFileUtil> timer_; | 247 base::OneShotTimer<ObfuscatedFileSystemFileUtil> timer_; |
240 FileSystemFileUtil* underlying_file_util_; | 248 FileSystemFileUtil* underlying_file_util_; |
241 | 249 |
242 DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileSystemFileUtil); | 250 DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileSystemFileUtil); |
243 }; | 251 }; |
244 | 252 |
245 } // namespace fileapi | 253 } // namespace fileapi |
246 | 254 |
247 #endif // WEBKIT_FILEAPI_OBFUSCATED_FILE_SYSTEM_FILE_UTIL_H_ | 255 #endif // WEBKIT_FILEAPI_OBFUSCATED_FILE_SYSTEM_FILE_UTIL_H_ |
OLD | NEW |