OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/sync_file_system/local/canned_syncable_file_system.h" | 5 #include "chrome/browser/sync_file_system/local/canned_syncable_file_system.h" |
6 | 6 |
7 #include <iterator> | 7 #include <iterator> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 io_task_runner_.get(), | 225 io_task_runner_.get(), |
226 base::MessageLoopProxy::current().get(), | 226 base::MessageLoopProxy::current().get(), |
227 storage_policy.get()); | 227 storage_policy.get()); |
228 | 228 |
229 std::vector<std::string> additional_allowed_schemes; | 229 std::vector<std::string> additional_allowed_schemes; |
230 additional_allowed_schemes.push_back(origin_.scheme()); | 230 additional_allowed_schemes.push_back(origin_.scheme()); |
231 fileapi::FileSystemOptions options( | 231 fileapi::FileSystemOptions options( |
232 fileapi::FileSystemOptions::PROFILE_MODE_NORMAL, | 232 fileapi::FileSystemOptions::PROFILE_MODE_NORMAL, |
233 additional_allowed_schemes); | 233 additional_allowed_schemes); |
234 | 234 |
| 235 SyncFileSystemBackend* backend = new SyncFileSystemBackend(&profile_); |
| 236 backend->set_skip_initialize_syncfs_service_for_testing(true); |
| 237 |
235 ScopedVector<fileapi::FileSystemBackend> additional_backends; | 238 ScopedVector<fileapi::FileSystemBackend> additional_backends; |
236 additional_backends.push_back(new SyncFileSystemBackend()); | 239 additional_backends.push_back(backend); |
237 | 240 |
238 file_system_context_ = new FileSystemContext( | 241 file_system_context_ = new FileSystemContext( |
239 io_task_runner_.get(), | 242 io_task_runner_.get(), |
240 file_task_runner_.get(), | 243 file_task_runner_.get(), |
241 fileapi::ExternalMountPoints::CreateRefCounted().get(), | 244 fileapi::ExternalMountPoints::CreateRefCounted().get(), |
242 storage_policy.get(), | 245 storage_policy.get(), |
243 quota_manager_->proxy(), | 246 quota_manager_->proxy(), |
244 additional_backends.Pass(), | 247 additional_backends.Pass(), |
245 data_dir_.path(), options); | 248 data_dir_.path(), options); |
246 | 249 |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 sync_status_ = status; | 672 sync_status_ = status; |
670 base::MessageLoop::current()->Quit(); | 673 base::MessageLoop::current()->Quit(); |
671 } | 674 } |
672 | 675 |
673 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { | 676 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { |
674 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); | 677 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); |
675 backend()->sync_context()->sync_status()->AddObserver(this); | 678 backend()->sync_context()->sync_status()->AddObserver(this); |
676 } | 679 } |
677 | 680 |
678 } // namespace sync_file_system | 681 } // namespace sync_file_system |
OLD | NEW |