| 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 "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 extension_service_.reset(new MockExtensionService); | 111 extension_service_.reset(new MockExtensionService); |
| 112 scoped_ptr<drive::DriveServiceInterface> | 112 scoped_ptr<drive::DriveServiceInterface> |
| 113 fake_drive_service(new drive::FakeDriveService); | 113 fake_drive_service(new drive::FakeDriveService); |
| 114 | 114 |
| 115 scoped_ptr<SyncEngineContext> | 115 scoped_ptr<SyncEngineContext> |
| 116 sync_engine_context(new SyncEngineContext( | 116 sync_engine_context(new SyncEngineContext( |
| 117 fake_drive_service.Pass(), | 117 fake_drive_service.Pass(), |
| 118 scoped_ptr<drive::DriveUploaderInterface>(), | 118 scoped_ptr<drive::DriveUploaderInterface>(), |
| 119 NULL /* task_logger */, | 119 NULL /* task_logger */, |
| 120 base::ThreadTaskRunnerHandle::Get() /* ui_task_runner */, | 120 base::ThreadTaskRunnerHandle::Get() /* ui_task_runner */, |
| 121 base::ThreadTaskRunnerHandle::Get() /* worker_task_runner */, | 121 base::ThreadTaskRunnerHandle::Get() /* worker_task_runner */)); |
| 122 base::ThreadTaskRunnerHandle::Get() /* file_task_runner */)); | |
| 123 | 122 |
| 124 sync_worker_.reset(new SyncWorker( | 123 sync_worker_.reset(new SyncWorker( |
| 125 profile_dir_.path(), | 124 profile_dir_.path(), |
| 126 extension_service_->AsWeakPtr(), | 125 extension_service_->AsWeakPtr(), |
| 127 in_memory_env_.get())); | 126 in_memory_env_.get())); |
| 128 sync_worker_->Initialize(sync_engine_context.Pass()); | 127 sync_worker_->Initialize(sync_engine_context.Pass()); |
| 129 | 128 |
| 130 sync_worker_->SetSyncEnabled(true); | 129 sync_worker_->SetSyncEnabled(true); |
| 131 base::RunLoop().RunUntilIdle(); | 130 base::RunLoop().RunUntilIdle(); |
| 132 } | 131 } |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 base::Bind(&SyncWorkerTest::CheckServiceState, | 381 base::Bind(&SyncWorkerTest::CheckServiceState, |
| 383 AsWeakPtr(), | 382 AsWeakPtr(), |
| 384 SYNC_STATUS_OK, | 383 SYNC_STATUS_OK, |
| 385 REMOTE_SERVICE_OK)); | 384 REMOTE_SERVICE_OK)); |
| 386 | 385 |
| 387 base::RunLoop().RunUntilIdle(); | 386 base::RunLoop().RunUntilIdle(); |
| 388 } | 387 } |
| 389 | 388 |
| 390 } // namespace drive_backend | 389 } // namespace drive_backend |
| 391 } // namespace sync_file_system | 390 } // namespace sync_file_system |
| OLD | NEW |