| 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>(), |
| 257 data_dir_.path(), options); | 258 data_dir_.path(), options); |
| 258 | 259 |
| 259 is_filesystem_set_up_ = true; | 260 is_filesystem_set_up_ = true; |
| 260 } | 261 } |
| 261 | 262 |
| 262 void CannedSyncableFileSystem::TearDown() { | 263 void CannedSyncableFileSystem::TearDown() { |
| 263 quota_manager_ = NULL; | 264 quota_manager_ = NULL; |
| 264 file_system_context_ = NULL; | 265 file_system_context_ = NULL; |
| 265 | 266 |
| 266 // Make sure we give some more time to finish tasks on other threads. | 267 // 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... |
| 745 sync_status_ = status; | 746 sync_status_ = status; |
| 746 base::MessageLoop::current()->Quit(); | 747 base::MessageLoop::current()->Quit(); |
| 747 } | 748 } |
| 748 | 749 |
| 749 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { | 750 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { |
| 750 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); | 751 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); |
| 751 backend()->sync_context()->sync_status()->AddObserver(this); | 752 backend()->sync_context()->sync_status()->AddObserver(this); |
| 752 } | 753 } |
| 753 | 754 |
| 754 } // namespace sync_file_system | 755 } // namespace sync_file_system |
| OLD | NEW |