| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <iterator> | 9 #include <iterator> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 base::ThreadTaskRunnerHandle::Get().get(), storage_policy.get()); | 245 base::ThreadTaskRunnerHandle::Get().get(), storage_policy.get()); |
| 246 } | 246 } |
| 247 | 247 |
| 248 std::vector<std::string> additional_allowed_schemes; | 248 std::vector<std::string> additional_allowed_schemes; |
| 249 additional_allowed_schemes.push_back(origin_.scheme()); | 249 additional_allowed_schemes.push_back(origin_.scheme()); |
| 250 storage::FileSystemOptions options( | 250 storage::FileSystemOptions options( |
| 251 storage::FileSystemOptions::PROFILE_MODE_NORMAL, | 251 storage::FileSystemOptions::PROFILE_MODE_NORMAL, |
| 252 additional_allowed_schemes, | 252 additional_allowed_schemes, |
| 253 env_override_); | 253 env_override_); |
| 254 | 254 |
| 255 ScopedVector<storage::FileSystemBackend> additional_backends; | 255 std::vector<std::unique_ptr<storage::FileSystemBackend>> additional_backends; |
| 256 additional_backends.push_back(SyncFileSystemBackend::CreateForTesting()); | 256 additional_backends.push_back(SyncFileSystemBackend::CreateForTesting()); |
| 257 | 257 |
| 258 file_system_context_ = new FileSystemContext( | 258 file_system_context_ = new FileSystemContext( |
| 259 io_task_runner_.get(), file_task_runner_.get(), | 259 io_task_runner_.get(), file_task_runner_.get(), |
| 260 storage::ExternalMountPoints::CreateRefCounted().get(), | 260 storage::ExternalMountPoints::CreateRefCounted().get(), |
| 261 storage_policy.get(), | 261 storage_policy.get(), |
| 262 quota_manager_.get() ? quota_manager_->proxy() : nullptr, | 262 quota_manager_.get() ? quota_manager_->proxy() : nullptr, |
| 263 std::move(additional_backends), | 263 std::move(additional_backends), |
| 264 std::vector<storage::URLRequestAutoMountHandler>(), data_dir_.GetPath(), | 264 std::vector<storage::URLRequestAutoMountHandler>(), data_dir_.GetPath(), |
| 265 options); | 265 options); |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 sync_status_ = status; | 753 sync_status_ = status; |
| 754 quit_closure.Run(); | 754 quit_closure.Run(); |
| 755 } | 755 } |
| 756 | 756 |
| 757 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { | 757 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { |
| 758 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); | 758 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); |
| 759 backend()->sync_context()->sync_status()->AddObserver(this); | 759 backend()->sync_context()->sync_status()->AddObserver(this); |
| 760 } | 760 } |
| 761 | 761 |
| 762 } // namespace sync_file_system | 762 } // namespace sync_file_system |
| OLD | NEW |