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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 require_copy_or_move_validator_(false) { | 141 require_copy_or_move_validator_(false) { |
142 } | 142 } |
143 | 143 |
144 TestFileSystemBackend::~TestFileSystemBackend() { | 144 TestFileSystemBackend::~TestFileSystemBackend() { |
145 } | 145 } |
146 | 146 |
147 bool TestFileSystemBackend::CanHandleType(FileSystemType type) const { | 147 bool TestFileSystemBackend::CanHandleType(FileSystemType type) const { |
148 return (type == kFileSystemTypeTest); | 148 return (type == kFileSystemTypeTest); |
149 } | 149 } |
150 | 150 |
151 void TestFileSystemBackend::OpenFileSystem( | 151 void TestFileSystemBackend::InitializeFileSystem( |
152 const GURL& origin_url, | 152 const GURL& origin_url, |
153 FileSystemType type, | 153 FileSystemType type, |
154 OpenFileSystemMode mode, | 154 OpenFileSystemMode mode, |
155 const OpenFileSystemCallback& callback) { | 155 FileSystemContext* context, |
| 156 const InitializeFileSystemCallback& callback) { |
156 callback.Run(GetFileSystemRootURI(origin_url, type), | 157 callback.Run(GetFileSystemRootURI(origin_url, type), |
157 GetFileSystemName(origin_url, type), | 158 GetFileSystemName(origin_url, type), |
158 base::PLATFORM_FILE_OK); | 159 base::PLATFORM_FILE_OK); |
159 } | 160 } |
160 | 161 |
161 FileSystemFileUtil* TestFileSystemBackend::GetFileUtil(FileSystemType type) { | 162 FileSystemFileUtil* TestFileSystemBackend::GetFileUtil(FileSystemType type) { |
162 DCHECK(local_file_util_.get()); | 163 DCHECK(local_file_util_.get()); |
163 return local_file_util_->sync_file_util(); | 164 return local_file_util_->sync_file_util(); |
164 } | 165 } |
165 | 166 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 return quota_util_->GetUpdateObservers(type); | 234 return quota_util_->GetUpdateObservers(type); |
234 } | 235 } |
235 | 236 |
236 void TestFileSystemBackend::AddFileChangeObserver( | 237 void TestFileSystemBackend::AddFileChangeObserver( |
237 FileChangeObserver* observer) { | 238 FileChangeObserver* observer) { |
238 quota_util_->AddFileChangeObserver( | 239 quota_util_->AddFileChangeObserver( |
239 kFileSystemTypeTest, observer, quota_util_->task_runner()); | 240 kFileSystemTypeTest, observer, quota_util_->task_runner()); |
240 } | 241 } |
241 | 242 |
242 } // namespace fileapi | 243 } // namespace fileapi |
OLD | NEW |