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

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

Issue 23068005: Convert UserPolicySigninService to use OAuth2TokenService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Corrected comment. Created 7 years, 4 months 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/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_;
};

Powered by Google App Engine
This is Rietveld 408576698