| 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/profile_sync_service.h" | 5 #include "components/browser_sync/profile_sync_service.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 | 303 |
| 304 FakeDataTypeManager::ConfigureCalled GetRecordingConfigureCalledCallback( | 304 FakeDataTypeManager::ConfigureCalled GetRecordingConfigureCalledCallback( |
| 305 syncer::ConfigureReason* reason) { | 305 syncer::ConfigureReason* reason) { |
| 306 return base::Bind(&ProfileSyncServiceTest::OnConfigureCalledRecordReason, | 306 return base::Bind(&ProfileSyncServiceTest::OnConfigureCalledRecordReason, |
| 307 base::Unretained(this), reason); | 307 base::Unretained(this), reason); |
| 308 } | 308 } |
| 309 | 309 |
| 310 void ExpectDataTypeManagerCreation( | 310 void ExpectDataTypeManagerCreation( |
| 311 int times, | 311 int times, |
| 312 const FakeDataTypeManager::ConfigureCalled& callback) { | 312 const FakeDataTypeManager::ConfigureCalled& callback) { |
| 313 EXPECT_CALL(*component_factory_, CreateDataTypeManager(_, _, _, _, _)) | 313 EXPECT_CALL(*component_factory_, CreateDataTypeManager(_, _, _, _, _, _)) |
| 314 .Times(times) | 314 .Times(times) |
| 315 .WillRepeatedly(ReturnNewDataTypeManager(callback)); | 315 .WillRepeatedly(ReturnNewDataTypeManager(callback)); |
| 316 } | 316 } |
| 317 | 317 |
| 318 void ExpectSyncEngineCreation(int times) { | 318 void ExpectSyncEngineCreation(int times) { |
| 319 EXPECT_CALL(*component_factory_, CreateSyncEngine(_, _, _, _)) | 319 EXPECT_CALL(*component_factory_, CreateSyncEngine(_, _, _, _)) |
| 320 .Times(times) | 320 .Times(times) |
| 321 .WillRepeatedly(ReturnNewFakeSyncEngine()); | 321 .WillRepeatedly(ReturnNewFakeSyncEngine()); |
| 322 } | 322 } |
| 323 | 323 |
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 970 // Progress the controller to RUNNING first, which is how the service | 970 // Progress the controller to RUNNING first, which is how the service |
| 971 // determines whether a type is enabled. | 971 // determines whether a type is enabled. |
| 972 controller->StartAssociating(base::Bind(&DoNothing)); | 972 controller->StartAssociating(base::Bind(&DoNothing)); |
| 973 controller->FinishStart(DataTypeController::OK_FIRST_RUN); | 973 controller->FinishStart(DataTypeController::OK_FIRST_RUN); |
| 974 service()->RegisterDataTypeController(std::move(controller)); | 974 service()->RegisterDataTypeController(std::move(controller)); |
| 975 EXPECT_NE(nullptr, service()->GetOpenTabsUIDelegate()); | 975 EXPECT_NE(nullptr, service()->GetOpenTabsUIDelegate()); |
| 976 } | 976 } |
| 977 | 977 |
| 978 } // namespace | 978 } // namespace |
| 979 } // namespace browser_sync | 979 } // namespace browser_sync |
| OLD | NEW |