Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Side by Side Diff: components/browser_sync/profile_sync_service_unittest.cc

Issue 2555433003: [Sync] Plumb initial type set from engine to DTM. (Closed)
Patch Set: Rebase. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « components/browser_sync/profile_sync_service_typed_url_unittest.cc ('k') | components/sync/driver/data_type_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698