OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "components/browser_sync/browser/abstract_profile_sync_service_test.h" | 5 #include "components/browser_sync/browser/abstract_profile_sync_service_test.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 } | 184 } |
185 | 185 |
186 void AbstractProfileSyncServiceTest::CreateSyncService( | 186 void AbstractProfileSyncServiceTest::CreateSyncService( |
187 std::unique_ptr<sync_driver::SyncClient> sync_client, | 187 std::unique_ptr<sync_driver::SyncClient> sync_client, |
188 const base::Closure& initialization_success_callback) { | 188 const base::Closure& initialization_success_callback) { |
189 DCHECK(sync_client); | 189 DCHECK(sync_client); |
190 ProfileSyncService::InitParams init_params = | 190 ProfileSyncService::InitParams init_params = |
191 profile_sync_service_bundle_.CreateBasicInitParams( | 191 profile_sync_service_bundle_.CreateBasicInitParams( |
192 ProfileSyncService::AUTO_START, std::move(sync_client)); | 192 ProfileSyncService::AUTO_START, std::move(sync_client)); |
193 sync_service_ = | 193 sync_service_ = |
194 base::WrapUnique(new TestProfileSyncService(std::move(init_params))); | 194 base::MakeUnique<TestProfileSyncService>(std::move(init_params)); |
195 | 195 |
196 SyncApiComponentFactoryMock* components = | 196 SyncApiComponentFactoryMock* components = |
197 profile_sync_service_bundle_.component_factory(); | 197 profile_sync_service_bundle_.component_factory(); |
198 EXPECT_CALL(*components, CreateSyncBackendHost(_, _, _, _)) | 198 EXPECT_CALL(*components, CreateSyncBackendHost(_, _, _, _)) |
199 .WillOnce(Return(new SyncBackendHostForProfileSyncTest( | 199 .WillOnce(Return(new SyncBackendHostForProfileSyncTest( |
200 temp_dir_.path(), sync_service_->GetSyncClient(), | 200 temp_dir_.path(), sync_service_->GetSyncClient(), |
201 base::ThreadTaskRunnerHandle::Get(), | 201 base::ThreadTaskRunnerHandle::Get(), |
202 profile_sync_service_bundle_.fake_invalidation_service(), | 202 profile_sync_service_bundle_.fake_invalidation_service(), |
203 sync_service_->sync_prefs()->AsWeakPtr(), | 203 sync_service_->sync_prefs()->AsWeakPtr(), |
204 initialization_success_callback))); | 204 initialization_success_callback))); |
(...skipping 24 matching lines...) Expand all Loading... |
229 return callback_; | 229 return callback_; |
230 } | 230 } |
231 | 231 |
232 bool CreateRootHelper::success() { | 232 bool CreateRootHelper::success() { |
233 return success_; | 233 return success_; |
234 } | 234 } |
235 | 235 |
236 void CreateRootHelper::CreateRootCallback() { | 236 void CreateRootHelper::CreateRootCallback() { |
237 success_ = test_->CreateRoot(model_type_); | 237 success_ = test_->CreateRoot(model_type_); |
238 } | 238 } |
OLD | NEW |