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 <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 ScopedVector<fileapi::FileSystemBackend> additional_backends; | 247 ScopedVector<fileapi::FileSystemBackend> additional_backends; |
248 additional_backends.push_back(SyncFileSystemBackend::CreateForTesting()); | 248 additional_backends.push_back(SyncFileSystemBackend::CreateForTesting()); |
249 | 249 |
250 file_system_context_ = new FileSystemContext( | 250 file_system_context_ = new FileSystemContext( |
251 io_task_runner_.get(), | 251 io_task_runner_.get(), |
252 file_task_runner_.get(), | 252 file_task_runner_.get(), |
253 fileapi::ExternalMountPoints::CreateRefCounted().get(), | 253 fileapi::ExternalMountPoints::CreateRefCounted().get(), |
254 storage_policy.get(), | 254 storage_policy.get(), |
255 quota_manager_ ? quota_manager_->proxy() : NULL, | 255 quota_manager_ ? quota_manager_->proxy() : NULL, |
256 additional_backends.Pass(), | 256 additional_backends.Pass(), |
257 std::vector<fileapi::URLRequestAutoMountHandler>(), | |
258 data_dir_.path(), options); | 257 data_dir_.path(), options); |
259 | 258 |
260 is_filesystem_set_up_ = true; | 259 is_filesystem_set_up_ = true; |
261 } | 260 } |
262 | 261 |
263 void CannedSyncableFileSystem::TearDown() { | 262 void CannedSyncableFileSystem::TearDown() { |
264 quota_manager_ = NULL; | 263 quota_manager_ = NULL; |
265 file_system_context_ = NULL; | 264 file_system_context_ = NULL; |
266 | 265 |
267 // Make sure we give some more time to finish tasks on other threads. | 266 // Make sure we give some more time to finish tasks on other threads. |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 sync_status_ = status; | 745 sync_status_ = status; |
747 base::MessageLoop::current()->Quit(); | 746 base::MessageLoop::current()->Quit(); |
748 } | 747 } |
749 | 748 |
750 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { | 749 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { |
751 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); | 750 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); |
752 backend()->sync_context()->sync_status()->AddObserver(this); | 751 backend()->sync_context()->sync_status()->AddObserver(this); |
753 } | 752 } |
754 | 753 |
755 } // namespace sync_file_system | 754 } // namespace sync_file_system |
OLD | NEW |