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_FILE_SYSTEM_TEST_HELPER_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_TEST_HELPER_H_ |
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_TEST_HELPER_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_TEST_HELPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 class FileSystemTestOriginHelper { | 36 class FileSystemTestOriginHelper { |
37 public: | 37 public: |
38 FileSystemTestOriginHelper(const GURL& origin, FileSystemType type); | 38 FileSystemTestOriginHelper(const GURL& origin, FileSystemType type); |
39 FileSystemTestOriginHelper(); | 39 FileSystemTestOriginHelper(); |
40 ~FileSystemTestOriginHelper(); | 40 ~FileSystemTestOriginHelper(); |
41 | 41 |
42 void SetUp(const FilePath& base_dir, FileSystemFileUtil* file_util); | 42 void SetUp(const FilePath& base_dir, FileSystemFileUtil* file_util); |
43 // If you want to use more than one FileSystemTestOriginHelper in a single | 43 // If you want to use more than one FileSystemTestOriginHelper in a single |
44 // base directory, they have to share a context, so that they don't have | 44 // base directory, they have to share a context, so that they don't have |
45 // multiple databases fighting over the lock to the origin directory [deep | 45 // multiple databases fighting over the lock to the origin directory [deep |
46 // down inside ObfuscatedFileSystemFileUtil]. | 46 // down inside ObfuscatedFileUtil]. |
47 void SetUp(FileSystemContext* file_system_context, | 47 void SetUp(FileSystemContext* file_system_context, |
48 FileSystemFileUtil* file_util); | 48 FileSystemFileUtil* file_util); |
49 void SetUp(const FilePath& base_dir, | 49 void SetUp(const FilePath& base_dir, |
50 bool incognito_mode, | 50 bool incognito_mode, |
51 bool unlimited_quota, | 51 bool unlimited_quota, |
52 quota::QuotaManagerProxy* quota_manager_proxy, | 52 quota::QuotaManagerProxy* quota_manager_proxy, |
53 FileSystemFileUtil* file_util); | 53 FileSystemFileUtil* file_util); |
54 void TearDown(); | 54 void TearDown(); |
55 | 55 |
56 FilePath GetOriginRootPath() const; | 56 FilePath GetOriginRootPath() const; |
57 FilePath GetLocalPath(const FilePath& path); | 57 FilePath GetLocalPath(const FilePath& path); |
58 FilePath GetLocalPathFromASCII(const std::string& path); | 58 FilePath GetLocalPathFromASCII(const std::string& path); |
(...skipping 27 matching lines...) Expand all Loading... |
86 scoped_refptr<FileSystemContext> file_system_context_; | 86 scoped_refptr<FileSystemContext> file_system_context_; |
87 const GURL origin_; | 87 const GURL origin_; |
88 const FileSystemType type_; | 88 const FileSystemType type_; |
89 FileSystemFileUtil* file_util_; | 89 FileSystemFileUtil* file_util_; |
90 int64 initial_usage_size_; | 90 int64 initial_usage_size_; |
91 }; | 91 }; |
92 | 92 |
93 } // namespace fileapi | 93 } // namespace fileapi |
94 | 94 |
95 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_TEST_HELPER_H_ | 95 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_TEST_HELPER_H_ |
OLD | NEW |