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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 ASSERT_TRUE(profile_dir_.CreateUniqueTempDir()); | 108 ASSERT_TRUE(profile_dir_.CreateUniqueTempDir()); |
109 in_memory_env_.reset(leveldb::NewMemEnv(leveldb::Env::Default())); | 109 in_memory_env_.reset(leveldb::NewMemEnv(leveldb::Env::Default())); |
110 | 110 |
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 nullptr /* drive_uploader */, |
119 nullptr /* task_logger */, | 119 nullptr /* 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 | 122 |
123 sync_worker_.reset(new SyncWorker( | 123 sync_worker_.reset(new SyncWorker( |
124 profile_dir_.path(), | 124 profile_dir_.path(), |
125 extension_service_->AsWeakPtr(), | 125 extension_service_->AsWeakPtr(), |
126 in_memory_env_.get())); | 126 in_memory_env_.get())); |
127 sync_worker_->Initialize(sync_engine_context.Pass()); | 127 sync_worker_->Initialize(sync_engine_context.Pass()); |
128 | 128 |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 base::Bind(&SyncWorkerTest::CheckServiceState, | 381 base::Bind(&SyncWorkerTest::CheckServiceState, |
382 AsWeakPtr(), | 382 AsWeakPtr(), |
383 SYNC_STATUS_OK, | 383 SYNC_STATUS_OK, |
384 REMOTE_SERVICE_OK)); | 384 REMOTE_SERVICE_OK)); |
385 | 385 |
386 base::RunLoop().RunUntilIdle(); | 386 base::RunLoop().RunUntilIdle(); |
387 } | 387 } |
388 | 388 |
389 } // namespace drive_backend | 389 } // namespace drive_backend |
390 } // namespace sync_file_system | 390 } // namespace sync_file_system |
OLD | NEW |