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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 if (require_copy_or_move_validator_) { | 178 if (require_copy_or_move_validator_) { |
179 if (!copy_or_move_file_validator_factory_) | 179 if (!copy_or_move_file_validator_factory_) |
180 *error_code = base::PLATFORM_FILE_ERROR_SECURITY; | 180 *error_code = base::PLATFORM_FILE_ERROR_SECURITY; |
181 return copy_or_move_file_validator_factory_.get(); | 181 return copy_or_move_file_validator_factory_.get(); |
182 } | 182 } |
183 return NULL; | 183 return NULL; |
184 } | 184 } |
185 | 185 |
186 void TestFileSystemBackend::InitializeCopyOrMoveFileValidatorFactory( | 186 void TestFileSystemBackend::InitializeCopyOrMoveFileValidatorFactory( |
187 scoped_ptr<CopyOrMoveFileValidatorFactory> factory) { | 187 scoped_ptr<CopyOrMoveFileValidatorFactory> factory) { |
188 // What purpose is this check serving? | |
189 if (!require_copy_or_move_validator_) { | |
190 DCHECK(!factory); | |
191 return; | |
192 } | |
193 if (!copy_or_move_file_validator_factory_) | 188 if (!copy_or_move_file_validator_factory_) |
194 copy_or_move_file_validator_factory_ = factory.Pass(); | 189 copy_or_move_file_validator_factory_ = factory.Pass(); |
195 } | 190 } |
196 | 191 |
197 FileSystemOperation* TestFileSystemBackend::CreateFileSystemOperation( | 192 FileSystemOperation* TestFileSystemBackend::CreateFileSystemOperation( |
198 const FileSystemURL& url, | 193 const FileSystemURL& url, |
199 FileSystemContext* context, | 194 FileSystemContext* context, |
200 base::PlatformFileError* error_code) const { | 195 base::PlatformFileError* error_code) const { |
201 scoped_ptr<FileSystemOperationContext> operation_context( | 196 scoped_ptr<FileSystemOperationContext> operation_context( |
202 new FileSystemOperationContext(context)); | 197 new FileSystemOperationContext(context)); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 return quota_util_->GetUpdateObservers(type); | 232 return quota_util_->GetUpdateObservers(type); |
238 } | 233 } |
239 | 234 |
240 void TestFileSystemBackend::AddFileChangeObserver( | 235 void TestFileSystemBackend::AddFileChangeObserver( |
241 FileChangeObserver* observer) { | 236 FileChangeObserver* observer) { |
242 quota_util_->AddFileChangeObserver( | 237 quota_util_->AddFileChangeObserver( |
243 kFileSystemTypeTest, observer, quota_util_->task_runner()); | 238 kFileSystemTypeTest, observer, quota_util_->task_runner()); |
244 } | 239 } |
245 | 240 |
246 } // namespace fileapi | 241 } // namespace fileapi |
OLD | NEW |