| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/drive_backend/sync_worker.h" | 5 #include "chrome/browser/sync_file_system/drive_backend/sync_worker.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 new drive::FakeDriveService); | 113 new drive::FakeDriveService); |
| 114 | 114 |
| 115 std::unique_ptr<SyncEngineContext> sync_engine_context( | 115 std::unique_ptr<SyncEngineContext> sync_engine_context( |
| 116 new SyncEngineContext( | 116 new SyncEngineContext( |
| 117 std::move(fake_drive_service), nullptr /* drive_uploader */, | 117 std::move(fake_drive_service), nullptr /* drive_uploader */, |
| 118 nullptr /* task_logger */, | 118 nullptr /* task_logger */, |
| 119 base::ThreadTaskRunnerHandle::Get() /* ui_task_runner */, | 119 base::ThreadTaskRunnerHandle::Get() /* ui_task_runner */, |
| 120 base::ThreadTaskRunnerHandle::Get() /* worker_task_runner */, | 120 base::ThreadTaskRunnerHandle::Get() /* worker_task_runner */, |
| 121 nullptr /* worker_pool */)); | 121 nullptr /* worker_pool */)); |
| 122 | 122 |
| 123 sync_worker_.reset(new SyncWorker( | 123 sync_worker_.reset(new SyncWorker(profile_dir_.GetPath(), |
| 124 profile_dir_.path(), | 124 extension_service_->AsWeakPtr(), |
| 125 extension_service_->AsWeakPtr(), | 125 in_memory_env_.get())); |
| 126 in_memory_env_.get())); | |
| 127 sync_worker_->Initialize(std::move(sync_engine_context)); | 126 sync_worker_->Initialize(std::move(sync_engine_context)); |
| 128 | 127 |
| 129 sync_worker_->SetSyncEnabled(true); | 128 sync_worker_->SetSyncEnabled(true); |
| 130 base::RunLoop().RunUntilIdle(); | 129 base::RunLoop().RunUntilIdle(); |
| 131 } | 130 } |
| 132 | 131 |
| 133 void TearDown() override { | 132 void TearDown() override { |
| 134 sync_worker_.reset(); | 133 sync_worker_.reset(); |
| 135 extension_service_.reset(); | 134 extension_service_.reset(); |
| 136 base::RunLoop().RunUntilIdle(); | 135 base::RunLoop().RunUntilIdle(); |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 FROM_HERE, std::unique_ptr<SyncTask>(new MockSyncTask(true)), | 375 FROM_HERE, std::unique_ptr<SyncTask>(new MockSyncTask(true)), |
| 377 SyncTaskManager::PRIORITY_MED, | 376 SyncTaskManager::PRIORITY_MED, |
| 378 base::Bind(&SyncWorkerTest::CheckServiceState, AsWeakPtr(), | 377 base::Bind(&SyncWorkerTest::CheckServiceState, AsWeakPtr(), |
| 379 SYNC_STATUS_OK, REMOTE_SERVICE_OK)); | 378 SYNC_STATUS_OK, REMOTE_SERVICE_OK)); |
| 380 | 379 |
| 381 base::RunLoop().RunUntilIdle(); | 380 base::RunLoop().RunUntilIdle(); |
| 382 } | 381 } |
| 383 | 382 |
| 384 } // namespace drive_backend | 383 } // namespace drive_backend |
| 385 } // namespace sync_file_system | 384 } // namespace sync_file_system |
| OLD | NEW |