| Index: chrome/browser/sync/profile_sync_service_startup_unittest.cc
|
| diff --git a/chrome/browser/sync/profile_sync_service_startup_unittest.cc b/chrome/browser/sync/profile_sync_service_startup_unittest.cc
|
| index 03160fd3b563efdbd5ca7cec458a0a12b8293804..7c3afc815fb9d6585df6d76640eb5036bbcb2f4f 100644
|
| --- a/chrome/browser/sync/profile_sync_service_startup_unittest.cc
|
| +++ b/chrome/browser/sync/profile_sync_service_startup_unittest.cc
|
| @@ -118,20 +118,19 @@ class ProfileSyncServiceStartupTest : public testing::Test {
|
| void SetUp() override {
|
| CHECK(profile_manager_.SetUp());
|
|
|
| - TestingProfile::TestingFactories testing_facotries;
|
| - testing_facotries.push_back(std::make_pair(
|
| + TestingProfile::TestingFactories testing_factories;
|
| + testing_factories.push_back(std::make_pair(
|
| SigninManagerFactory::GetInstance(), BuildFakeSigninManagerBase));
|
| - testing_facotries.push_back(
|
| - std::make_pair(ProfileOAuth2TokenServiceFactory::GetInstance(),
|
| - BuildAutoIssuingFakeProfileOAuth2TokenService));
|
| - testing_facotries.push_back(
|
| - std::make_pair(ProfileSyncServiceFactory::GetInstance(),
|
| - BuildService));
|
| + testing_factories.push_back(
|
| + std::make_pair(ProfileOAuth2TokenServiceFactory::GetInstance(),
|
| + BuildAutoIssuingFakeProfileOAuth2TokenService));
|
| + testing_factories.push_back(
|
| + std::make_pair(ProfileSyncServiceFactory::GetInstance(), BuildService));
|
|
|
| profile_ = profile_manager_.CreateTestingProfile(
|
| "sync-startup-test", scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
|
| base::UTF8ToUTF16("sync-startup-test"), 0, std::string(),
|
| - testing_facotries);
|
| + testing_factories);
|
| }
|
|
|
| void TearDown() override { sync_->RemoveObserver(&observer_); }
|
| @@ -140,8 +139,9 @@ class ProfileSyncServiceStartupTest : public testing::Test {
|
| content::BrowserContext* browser_context) {
|
| Profile* profile = static_cast<Profile*>(browser_context);
|
| scoped_ptr<browser_sync::ChromeSyncClient> sync_client(
|
| - new browser_sync::ChromeSyncClient(
|
| - profile, make_scoped_ptr(new SyncApiComponentFactoryMock())));
|
| + new browser_sync::ChromeSyncClient(profile));
|
| + sync_client->SetSyncApiComponentFactoryForTesting(
|
| + make_scoped_ptr(new SyncApiComponentFactoryMock()));
|
| return make_scoped_ptr(new TestProfileSyncServiceNoBackup(
|
| sync_client.Pass(), profile,
|
| make_scoped_ptr(new SigninManagerWrapper(
|
| @@ -212,7 +212,7 @@ class ProfileSyncServiceStartupTest : public testing::Test {
|
| browser_sync::SyncBackendHostMock* sync_backend_host =
|
| new browser_sync::SyncBackendHostMock();
|
| EXPECT_CALL(*GetSyncApiComponentFactoryMock(),
|
| - CreateSyncBackendHost(_, _, _, _, _))
|
| + CreateSyncBackendHost(_, _, _, _))
|
| .WillOnce(Return(sync_backend_host));
|
| return sync_backend_host;
|
| }
|
| @@ -246,8 +246,9 @@ class ProfileSyncServiceStartupCrosTest : public ProfileSyncServiceStartupTest {
|
| ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
|
| EXPECT_TRUE(signin->IsAuthenticated());
|
| scoped_ptr<browser_sync::ChromeSyncClient> sync_client(
|
| - new browser_sync::ChromeSyncClient(
|
| - profile, make_scoped_ptr(new SyncApiComponentFactoryMock())));
|
| + new browser_sync::ChromeSyncClient(profile));
|
| + sync_client->SetSyncApiComponentFactoryForTesting(
|
| + make_scoped_ptr(new SyncApiComponentFactoryMock()));
|
| return make_scoped_ptr(new TestProfileSyncServiceNoBackup(
|
| sync_client.Pass(), profile,
|
| make_scoped_ptr(new SigninManagerWrapper(signin)), oauth2_token_service,
|
| @@ -378,7 +379,7 @@ TEST_F(ProfileSyncServiceStartupCrosTest, StartCrosNoCredentials) {
|
| CreateDataTypeManager(_, _, _, _, _))
|
| .Times(0);
|
| EXPECT_CALL(*GetSyncApiComponentFactoryMock(),
|
| - CreateSyncBackendHost(_, _, _, _, _))
|
| + CreateSyncBackendHost(_, _, _, _))
|
| .Times(0);
|
| profile_->GetPrefs()->ClearPref(sync_driver::prefs::kSyncHasSetupCompleted);
|
| EXPECT_CALL(observer_, OnStateChanged()).Times(AnyNumber());
|
|
|