| 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 STORAGE_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ | 5 #ifndef STORAGE_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ |
| 6 #define STORAGE_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ | 6 #define STORAGE_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // for any known type exists the origin directory may get deleted when | 101 // for any known type exists the origin directory may get deleted when |
| 102 // one origin/type pair is deleted. | 102 // one origin/type pair is deleted. |
| 103 // | 103 // |
| 104 ObfuscatedFileUtil(storage::SpecialStoragePolicy* special_storage_policy, | 104 ObfuscatedFileUtil(storage::SpecialStoragePolicy* special_storage_policy, |
| 105 const base::FilePath& file_system_directory, | 105 const base::FilePath& file_system_directory, |
| 106 leveldb::Env* env_override, | 106 leveldb::Env* env_override, |
| 107 base::SequencedTaskRunner* file_task_runner, | 107 base::SequencedTaskRunner* file_task_runner, |
| 108 const GetTypeStringForURLCallback& get_type_string_for_url, | 108 const GetTypeStringForURLCallback& get_type_string_for_url, |
| 109 const std::set<std::string>& known_type_strings, | 109 const std::set<std::string>& known_type_strings, |
| 110 SandboxFileSystemBackendDelegate* sandbox_delegate); | 110 SandboxFileSystemBackendDelegate* sandbox_delegate); |
| 111 virtual ~ObfuscatedFileUtil(); | 111 ~ObfuscatedFileUtil() override; |
| 112 | 112 |
| 113 // FileSystemFileUtil overrides. | 113 // FileSystemFileUtil overrides. |
| 114 virtual base::File CreateOrOpen( | 114 base::File CreateOrOpen(FileSystemOperationContext* context, |
| 115 FileSystemOperationContext* context, | 115 const FileSystemURL& url, |
| 116 const FileSystemURL& url, | 116 int file_flags) override; |
| 117 int file_flags) override; | 117 base::File::Error EnsureFileExists(FileSystemOperationContext* context, |
| 118 virtual base::File::Error EnsureFileExists( | 118 const FileSystemURL& url, |
| 119 FileSystemOperationContext* context, | 119 bool* created) override; |
| 120 const FileSystemURL& url, bool* created) override; | 120 base::File::Error CreateDirectory(FileSystemOperationContext* context, |
| 121 virtual base::File::Error CreateDirectory( | 121 const FileSystemURL& url, |
| 122 FileSystemOperationContext* context, | 122 bool exclusive, |
| 123 const FileSystemURL& url, | 123 bool recursive) override; |
| 124 bool exclusive, | 124 base::File::Error GetFileInfo(FileSystemOperationContext* context, |
| 125 bool recursive) override; | 125 const FileSystemURL& url, |
| 126 virtual base::File::Error GetFileInfo( | 126 base::File::Info* file_info, |
| 127 FileSystemOperationContext* context, | 127 base::FilePath* platform_file) override; |
| 128 const FileSystemURL& url, | 128 scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( |
| 129 base::File::Info* file_info, | |
| 130 base::FilePath* platform_file) override; | |
| 131 virtual scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( | |
| 132 FileSystemOperationContext* context, | 129 FileSystemOperationContext* context, |
| 133 const FileSystemURL& root_url) override; | 130 const FileSystemURL& root_url) override; |
| 134 virtual base::File::Error GetLocalFilePath( | 131 base::File::Error GetLocalFilePath(FileSystemOperationContext* context, |
| 135 FileSystemOperationContext* context, | 132 const FileSystemURL& file_system_url, |
| 136 const FileSystemURL& file_system_url, | 133 base::FilePath* local_path) override; |
| 137 base::FilePath* local_path) override; | 134 base::File::Error Touch(FileSystemOperationContext* context, |
| 138 virtual base::File::Error Touch( | 135 const FileSystemURL& url, |
| 139 FileSystemOperationContext* context, | 136 const base::Time& last_access_time, |
| 140 const FileSystemURL& url, | 137 const base::Time& last_modified_time) override; |
| 141 const base::Time& last_access_time, | 138 base::File::Error Truncate(FileSystemOperationContext* context, |
| 142 const base::Time& last_modified_time) override; | 139 const FileSystemURL& url, |
| 143 virtual base::File::Error Truncate( | 140 int64 length) override; |
| 144 FileSystemOperationContext* context, | 141 base::File::Error CopyOrMoveFile(FileSystemOperationContext* context, |
| 145 const FileSystemURL& url, | 142 const FileSystemURL& src_url, |
| 146 int64 length) override; | 143 const FileSystemURL& dest_url, |
| 147 virtual base::File::Error CopyOrMoveFile( | 144 CopyOrMoveOption option, |
| 148 FileSystemOperationContext* context, | 145 bool copy) override; |
| 149 const FileSystemURL& src_url, | 146 base::File::Error CopyInForeignFile(FileSystemOperationContext* context, |
| 150 const FileSystemURL& dest_url, | 147 const base::FilePath& src_file_path, |
| 151 CopyOrMoveOption option, | 148 const FileSystemURL& dest_url) override; |
| 152 bool copy) override; | 149 base::File::Error DeleteFile(FileSystemOperationContext* context, |
| 153 virtual base::File::Error CopyInForeignFile( | 150 const FileSystemURL& url) override; |
| 154 FileSystemOperationContext* context, | 151 base::File::Error DeleteDirectory(FileSystemOperationContext* context, |
| 155 const base::FilePath& src_file_path, | 152 const FileSystemURL& url) override; |
| 156 const FileSystemURL& dest_url) override; | 153 storage::ScopedFile CreateSnapshotFile( |
| 157 virtual base::File::Error DeleteFile( | |
| 158 FileSystemOperationContext* context, | |
| 159 const FileSystemURL& url) override; | |
| 160 virtual base::File::Error DeleteDirectory( | |
| 161 FileSystemOperationContext* context, | |
| 162 const FileSystemURL& url) override; | |
| 163 virtual storage::ScopedFile CreateSnapshotFile( | |
| 164 FileSystemOperationContext* context, | 154 FileSystemOperationContext* context, |
| 165 const FileSystemURL& url, | 155 const FileSystemURL& url, |
| 166 base::File::Error* error, | 156 base::File::Error* error, |
| 167 base::File::Info* file_info, | 157 base::File::Info* file_info, |
| 168 base::FilePath* platform_path) override; | 158 base::FilePath* platform_path) override; |
| 169 | 159 |
| 170 // Same as the other CreateFileEnumerator, but with recursive support. | 160 // Same as the other CreateFileEnumerator, but with recursive support. |
| 171 scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( | 161 scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( |
| 172 FileSystemOperationContext* context, | 162 FileSystemOperationContext* context, |
| 173 const FileSystemURL& root_url, | 163 const FileSystemURL& root_url, |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 | 340 |
| 351 // Not owned. | 341 // Not owned. |
| 352 SandboxFileSystemBackendDelegate* sandbox_delegate_; | 342 SandboxFileSystemBackendDelegate* sandbox_delegate_; |
| 353 | 343 |
| 354 DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileUtil); | 344 DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileUtil); |
| 355 }; | 345 }; |
| 356 | 346 |
| 357 } // namespace storage | 347 } // namespace storage |
| 358 | 348 |
| 359 #endif // STORAGE_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ | 349 #endif // STORAGE_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ |
| OLD | NEW |