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

Unified Diff: chrome/browser/sync/test_profile_sync_service.cc

Issue 1421003007: [Sync] Componentize ProfileSyncComponentsFactoryImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/test_profile_sync_service.cc
diff --git a/chrome/browser/sync/test_profile_sync_service.cc b/chrome/browser/sync/test_profile_sync_service.cc
index ea7778bed8ab176e142895cb3392eb8f3af88202..2e42b46eeebae61623e20af34d795eda52d302e0 100644
--- a/chrome/browser/sync/test_profile_sync_service.cc
+++ b/chrome/browser/sync/test_profile_sync_service.cc
@@ -126,22 +126,23 @@ TestProfileSyncService::TestProfileSyncService(
SigninManagerBase* signin,
ProfileOAuth2TokenService* oauth2_token_service,
browser_sync::ProfileSyncServiceStartBehavior behavior)
- : ProfileSyncService(make_scoped_ptr(new browser_sync::ChromeSyncClient(
- profile,
- make_scoped_ptr(new SyncApiComponentFactoryMock))),
- make_scoped_ptr(new SigninManagerWrapper(signin)),
- oauth2_token_service,
- behavior,
- base::Bind(&EmptyNetworkTimeUpdate),
- profile->GetPath(),
- profile->GetRequestContext(),
- profile->GetDebugName(),
- chrome::GetChannel(),
- content::BrowserThread::GetMessageLoopProxyForThread(
- content::BrowserThread::DB),
- content::BrowserThread::GetMessageLoopProxyForThread(
- content::BrowserThread::FILE),
- content::BrowserThread::GetBlockingPool()) {
+ : ProfileSyncService(
+ make_scoped_ptr(new browser_sync::ChromeSyncClient(profile)),
+ make_scoped_ptr(new SigninManagerWrapper(signin)),
+ oauth2_token_service,
+ behavior,
+ base::Bind(&EmptyNetworkTimeUpdate),
+ profile->GetPath(),
+ profile->GetRequestContext(),
+ profile->GetDebugName(),
+ chrome::GetChannel(),
+ content::BrowserThread::GetMessageLoopProxyForThread(
+ content::BrowserThread::DB),
+ content::BrowserThread::GetMessageLoopProxyForThread(
+ content::BrowserThread::FILE),
+ content::BrowserThread::GetBlockingPool()) {
+ GetSyncClient()->Initialize(
+ make_scoped_ptr(new SyncApiComponentFactoryMock()), this);
SetSyncSetupCompleted();
}
@@ -169,9 +170,8 @@ TestProfileSyncService* TestProfileSyncService::BuildAutoStartAsyncInit(
SyncApiComponentFactoryMock* components =
sync_service->GetSyncApiComponentFactoryMock();
// TODO(tim): Convert to a fake instead of mock.
- EXPECT_CALL(*components,
- CreateSyncBackendHost(testing::_, testing::_, testing::_,
- testing::_, testing::_))
+ EXPECT_CALL(*components, CreateSyncBackendHost(testing::_, testing::_,
+ testing::_, testing::_))
.WillOnce(
testing::Return(new browser_sync::SyncBackendHostForProfileSyncTest(
profile, sync_service->GetSyncClient(),

Powered by Google App Engine
This is Rietveld 408576698