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