Chromium Code Reviews| 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_LOCAL_FILE_SYSTEM_FILE_UTIL_H_ | 5 #ifndef WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_FILE_UTIL_H_ |
| 6 #define WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_FILE_UTIL_H_ | 6 #define WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_FILE_UTIL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 FileSystemOperationContext* context, | 42 FileSystemOperationContext* context, |
| 43 const FilePath& file_path, | 43 const FilePath& file_path, |
| 44 int file_flags, | 44 int file_flags, |
| 45 PlatformFile* file_handle, | 45 PlatformFile* file_handle, |
| 46 bool* created); | 46 bool* created); |
| 47 | 47 |
| 48 virtual PlatformFileError EnsureFileExists( | 48 virtual PlatformFileError EnsureFileExists( |
| 49 FileSystemOperationContext* context, | 49 FileSystemOperationContext* context, |
| 50 const FilePath& file_path, bool* created); | 50 const FilePath& file_path, bool* created); |
| 51 | 51 |
| 52 virtual PlatformFileError GetLocalFilePath( | |
| 53 FileSystemOperationContext* context, | |
| 54 const FilePath& virtual_file, | |
| 55 FilePath* local_path); | |
| 56 | |
| 52 virtual PlatformFileError GetFileInfo( | 57 virtual PlatformFileError GetFileInfo( |
| 53 FileSystemOperationContext* context, | 58 FileSystemOperationContext* context, |
| 54 const FilePath& file_, | 59 const FilePath& file, |
| 55 base::PlatformFileInfo* file_info, | 60 base::PlatformFileInfo* file_info, |
| 56 FilePath* platform_file); | 61 FilePath* platform_file); |
| 57 | 62 |
| 63 virtual FilePath GetLocalPath( | |
|
ericu
2011/04/19 20:30:49
Why is this now virtual and public? I think exter
zel
2011/04/19 23:14:00
Done.
| |
| 64 FileSystemOperationContext* context, | |
| 65 const GURL& origin_url, | |
| 66 FileSystemType type, | |
| 67 const FilePath& virtual_path); | |
| 68 | |
| 58 virtual PlatformFileError ReadDirectory( | 69 virtual PlatformFileError ReadDirectory( |
| 59 FileSystemOperationContext* context, | 70 FileSystemOperationContext* context, |
| 60 const FilePath& file_path, | 71 const FilePath& file_path, |
| 61 std::vector<base::FileUtilProxy::Entry>* entries); | 72 std::vector<base::FileUtilProxy::Entry>* entries); |
| 62 | 73 |
| 63 virtual PlatformFileError CreateDirectory( | 74 virtual PlatformFileError CreateDirectory( |
| 64 FileSystemOperationContext* context, | 75 FileSystemOperationContext* context, |
| 65 const FilePath& file_path, | 76 const FilePath& file_path, |
| 66 bool exclusive, | 77 bool exclusive, |
| 67 bool recursive); | 78 bool recursive); |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 92 const FilePath& path, | 103 const FilePath& path, |
| 93 int64 length); | 104 int64 length); |
| 94 | 105 |
| 95 protected: | 106 protected: |
| 96 LocalFileSystemFileUtil() { } | 107 LocalFileSystemFileUtil() { } |
| 97 | 108 |
| 98 friend struct DefaultSingletonTraits<LocalFileSystemFileUtil>; | 109 friend struct DefaultSingletonTraits<LocalFileSystemFileUtil>; |
| 99 DISALLOW_COPY_AND_ASSIGN(LocalFileSystemFileUtil); | 110 DISALLOW_COPY_AND_ASSIGN(LocalFileSystemFileUtil); |
| 100 | 111 |
| 101 private: | 112 private: |
| 102 // Given the filesystem's root URL and a virtual path, produces a real, full | |
| 103 // local path. | |
| 104 FilePath GetLocalPath( | |
| 105 FileSystemOperationContext* context, | |
| 106 const GURL& origin_url, | |
| 107 FileSystemType type, | |
| 108 const FilePath& virtual_path); | |
| 109 | |
| 110 }; | 113 }; |
| 111 | 114 |
| 112 } // namespace fileapi | 115 } // namespace fileapi |
| 113 | 116 |
| 114 #endif // WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_FILE_UTIL_H_ | 117 #endif // WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_FILE_UTIL_H_ |
| OLD | NEW |