Index: chrome/browser/sync/profile_sync_service_password_unittest.cc |
diff --git a/chrome/browser/sync/profile_sync_service_password_unittest.cc b/chrome/browser/sync/profile_sync_service_password_unittest.cc |
index 17b952365f95c0ccf071173b6ae7e38cdfa35582..b6941e0ac45d7ab0cb6c4985fd5e9de0e86cc9f8 100644 |
--- a/chrome/browser/sync/profile_sync_service_password_unittest.cc |
+++ b/chrome/browser/sync/profile_sync_service_password_unittest.cc |
@@ -154,7 +154,10 @@ class ProfileSyncServicePasswordTest : public AbstractProfileSyncServiceTest { |
virtual void SetUp() { |
AbstractProfileSyncServiceTest::SetUp(); |
- profile_.reset(new ProfileMock()); |
+ TestingProfile::Builder builder; |
+ builder.AddTestingFactory(ProfileOAuth2TokenServiceFactory::GetInstance(), |
+ FakeOAuth2TokenService::BuildTokenService); |
+ profile_ = builder.Build().Pass(); |
invalidation::InvalidationServiceFactory::GetInstance()-> |
SetBuildOnlyFakeInvalidatorsForTest(true); |
password_store_ = static_cast<MockPasswordStore*>( |
@@ -192,8 +195,6 @@ class ProfileSyncServicePasswordTest : public AbstractProfileSyncServiceTest { |
token_service_ = static_cast<TokenService*>( |
TokenServiceFactory::GetInstance()->SetTestingFactoryAndUse( |
profile_.get(), BuildTokenService)); |
- ProfileOAuth2TokenServiceFactory::GetInstance()->SetTestingFactory( |
- profile_.get(), FakeOAuth2TokenService::BuildTokenService); |
PasswordTestProfileSyncService* sync = |
static_cast<PasswordTestProfileSyncService*>( |
@@ -314,7 +315,7 @@ class ProfileSyncServicePasswordTest : public AbstractProfileSyncServiceTest { |
} |
content::MockNotificationObserver observer_; |
- scoped_ptr<ProfileMock> profile_; |
+ scoped_ptr<TestingProfile> profile_; |
scoped_refptr<MockPasswordStore> password_store_; |
content::NotificationRegistrar registrar_; |
}; |