| 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_OBFUSCATED_FILE_UTIL_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ |
| 6 #define WEBKIT_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ | 6 #define WEBKIT_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 14 matching lines...) Expand all Loading... |
| 25 #include "webkit/common/blob/shareable_file_reference.h" | 25 #include "webkit/common/blob/shareable_file_reference.h" |
| 26 #include "webkit/common/fileapi/file_system_types.h" | 26 #include "webkit/common/fileapi/file_system_types.h" |
| 27 | 27 |
| 28 namespace base { | 28 namespace base { |
| 29 class SequencedTaskRunner; | 29 class SequencedTaskRunner; |
| 30 class TimeTicks; | 30 class TimeTicks; |
| 31 } | 31 } |
| 32 | 32 |
| 33 namespace content { | 33 namespace content { |
| 34 class ObfuscatedFileUtilTest; | 34 class ObfuscatedFileUtilTest; |
| 35 class QuotaBackendImplTest; |
| 35 } | 36 } |
| 36 | 37 |
| 37 namespace quota { | 38 namespace quota { |
| 38 class SpecialStoragePolicy; | 39 class SpecialStoragePolicy; |
| 39 } | 40 } |
| 40 | 41 |
| 41 class GURL; | 42 class GURL; |
| 42 | 43 |
| 43 namespace fileapi { | 44 namespace fileapi { |
| 44 | 45 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 // once it succeeds to do so for one database (i.e. it prepopulates | 229 // once it succeeds to do so for one database (i.e. it prepopulates |
| 229 // at most one database). | 230 // at most one database). |
| 230 void MaybePrepopulateDatabase( | 231 void MaybePrepopulateDatabase( |
| 231 const std::vector<std::string>& type_strings_to_prepopulate); | 232 const std::vector<std::string>& type_strings_to_prepopulate); |
| 232 | 233 |
| 233 private: | 234 private: |
| 234 typedef SandboxDirectoryDatabase::FileId FileId; | 235 typedef SandboxDirectoryDatabase::FileId FileId; |
| 235 typedef SandboxDirectoryDatabase::FileInfo FileInfo; | 236 typedef SandboxDirectoryDatabase::FileInfo FileInfo; |
| 236 | 237 |
| 237 friend class ObfuscatedFileEnumerator; | 238 friend class ObfuscatedFileEnumerator; |
| 238 friend class QuotaBackendImplTest; | |
| 239 friend class content::ObfuscatedFileUtilTest; | 239 friend class content::ObfuscatedFileUtilTest; |
| 240 friend class content::QuotaBackendImplTest; |
| 240 | 241 |
| 241 // Helper method to create an obfuscated file util for regular | 242 // Helper method to create an obfuscated file util for regular |
| 242 // (temporary, persistent) file systems. Used only for testing. | 243 // (temporary, persistent) file systems. Used only for testing. |
| 243 // Note: this is implemented in sandbox_file_system_backend_delegate.cc. | 244 // Note: this is implemented in sandbox_file_system_backend_delegate.cc. |
| 244 static ObfuscatedFileUtil* CreateForTesting( | 245 static ObfuscatedFileUtil* CreateForTesting( |
| 245 quota::SpecialStoragePolicy* special_storage_policy, | 246 quota::SpecialStoragePolicy* special_storage_policy, |
| 246 const base::FilePath& file_system_directory, | 247 const base::FilePath& file_system_directory, |
| 247 leveldb::Env* env_override, | 248 leveldb::Env* env_override, |
| 248 base::SequencedTaskRunner* file_task_runner); | 249 base::SequencedTaskRunner* file_task_runner); |
| 249 | 250 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 | 350 |
| 350 // Not owned. | 351 // Not owned. |
| 351 SandboxFileSystemBackendDelegate* sandbox_delegate_; | 352 SandboxFileSystemBackendDelegate* sandbox_delegate_; |
| 352 | 353 |
| 353 DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileUtil); | 354 DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileUtil); |
| 354 }; | 355 }; |
| 355 | 356 |
| 356 } // namespace fileapi | 357 } // namespace fileapi |
| 357 | 358 |
| 358 #endif // WEBKIT_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ | 359 #endif // WEBKIT_BROWSER_FILEAPI_OBFUSCATED_FILE_UTIL_H_ |
| OLD | NEW |