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 #include "webkit/browser/fileapi/test_file_system_backend.h" | 5 #include "webkit/browser/fileapi/test_file_system_backend.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 const GURL& origin_url, | 152 const GURL& origin_url, |
153 FileSystemType type, | 153 FileSystemType type, |
154 OpenFileSystemMode mode, | 154 OpenFileSystemMode mode, |
155 FileSystemContext* context, | 155 FileSystemContext* context, |
156 const InitializeFileSystemCallback& callback) { | 156 const InitializeFileSystemCallback& callback) { |
157 callback.Run(GetFileSystemRootURI(origin_url, type), | 157 callback.Run(GetFileSystemRootURI(origin_url, type), |
158 GetFileSystemName(origin_url, type), | 158 GetFileSystemName(origin_url, type), |
159 base::PLATFORM_FILE_OK); | 159 base::PLATFORM_FILE_OK); |
160 } | 160 } |
161 | 161 |
162 FileSystemFileUtil* TestFileSystemBackend::GetFileUtil(FileSystemType type) { | 162 FileSystemFileUtil* TestFileSystemBackend::GetFileUtil( |
| 163 FileSystemType type, |
| 164 const FileSystemContext* context) { |
163 DCHECK(local_file_util_.get()); | 165 DCHECK(local_file_util_.get()); |
164 return local_file_util_->sync_file_util(); | 166 return local_file_util_->sync_file_util(); |
165 } | 167 } |
166 | 168 |
167 AsyncFileUtil* TestFileSystemBackend::GetAsyncFileUtil(FileSystemType type) { | 169 AsyncFileUtil* TestFileSystemBackend::GetAsyncFileUtil( |
| 170 FileSystemType type, |
| 171 const FileSystemContext* context) { |
168 return local_file_util_.get(); | 172 return local_file_util_.get(); |
169 } | 173 } |
170 | 174 |
171 CopyOrMoveFileValidatorFactory* | 175 CopyOrMoveFileValidatorFactory* |
172 TestFileSystemBackend::GetCopyOrMoveFileValidatorFactory( | 176 TestFileSystemBackend::GetCopyOrMoveFileValidatorFactory( |
173 FileSystemType type, base::PlatformFileError* error_code) { | 177 FileSystemType type, base::PlatformFileError* error_code) { |
174 DCHECK(error_code); | 178 DCHECK(error_code); |
175 *error_code = base::PLATFORM_FILE_OK; | 179 *error_code = base::PLATFORM_FILE_OK; |
176 if (require_copy_or_move_validator_) { | 180 if (require_copy_or_move_validator_) { |
177 if (!copy_or_move_file_validator_factory_) | 181 if (!copy_or_move_file_validator_factory_) |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 return quota_util_->GetUpdateObservers(type); | 238 return quota_util_->GetUpdateObservers(type); |
235 } | 239 } |
236 | 240 |
237 void TestFileSystemBackend::AddFileChangeObserver( | 241 void TestFileSystemBackend::AddFileChangeObserver( |
238 FileChangeObserver* observer) { | 242 FileChangeObserver* observer) { |
239 quota_util_->AddFileChangeObserver( | 243 quota_util_->AddFileChangeObserver( |
240 kFileSystemTypeTest, observer, quota_util_->task_runner()); | 244 kFileSystemTypeTest, observer, quota_util_->task_runner()); |
241 } | 245 } |
242 | 246 |
243 } // namespace fileapi | 247 } // namespace fileapi |
OLD | NEW |