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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 void TestFileSystemBackend::OpenFileSystem( | 143 void TestFileSystemBackend::OpenFileSystem( |
144 const GURL& origin_url, | 144 const GURL& origin_url, |
145 FileSystemType type, | 145 FileSystemType type, |
146 OpenFileSystemMode mode, | 146 OpenFileSystemMode mode, |
147 const OpenFileSystemCallback& callback) { | 147 const OpenFileSystemCallback& callback) { |
148 callback.Run(GetFileSystemRootURI(origin_url, type), | 148 callback.Run(GetFileSystemRootURI(origin_url, type), |
149 GetFileSystemName(origin_url, type), | 149 GetFileSystemName(origin_url, type), |
150 base::PLATFORM_FILE_OK); | 150 base::PLATFORM_FILE_OK); |
151 } | 151 } |
152 | 152 |
153 FileSystemFileUtil* TestFileSystemBackend::GetFileUtil(FileSystemType type) { | |
154 DCHECK(local_file_util_.get()); | |
155 return local_file_util_->sync_file_util(); | |
156 } | |
157 | |
158 AsyncFileUtil* TestFileSystemBackend::GetAsyncFileUtil(FileSystemType type) { | 153 AsyncFileUtil* TestFileSystemBackend::GetAsyncFileUtil(FileSystemType type) { |
159 return local_file_util_.get(); | 154 return local_file_util_.get(); |
160 } | 155 } |
161 | 156 |
162 CopyOrMoveFileValidatorFactory* | 157 CopyOrMoveFileValidatorFactory* |
163 TestFileSystemBackend::GetCopyOrMoveFileValidatorFactory( | 158 TestFileSystemBackend::GetCopyOrMoveFileValidatorFactory( |
164 FileSystemType type, base::PlatformFileError* error_code) { | 159 FileSystemType type, base::PlatformFileError* error_code) { |
165 DCHECK(error_code); | 160 DCHECK(error_code); |
166 *error_code = base::PLATFORM_FILE_OK; | 161 *error_code = base::PLATFORM_FILE_OK; |
167 if (require_copy_or_move_validator_) { | 162 if (require_copy_or_move_validator_) { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 return quota_util_->GetUpdateObservers(type); | 216 return quota_util_->GetUpdateObservers(type); |
222 } | 217 } |
223 | 218 |
224 void TestFileSystemBackend::AddFileChangeObserver( | 219 void TestFileSystemBackend::AddFileChangeObserver( |
225 FileChangeObserver* observer) { | 220 FileChangeObserver* observer) { |
226 quota_util_->AddFileChangeObserver( | 221 quota_util_->AddFileChangeObserver( |
227 kFileSystemTypeTest, observer, quota_util_->task_runner()); | 222 kFileSystemTypeTest, observer, quota_util_->task_runner()); |
228 } | 223 } |
229 | 224 |
230 } // namespace fileapi | 225 } // namespace fileapi |
OLD | NEW |