Index: chrome/browser/sync/profile_sync_service_unittest.cc |
diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc |
index ff213c2b405f2a561749afe22e9f2aa12c354192..b2d1a5367eb43eb1065931a781e76cb97ebfe414 100644 |
--- a/chrome/browser/sync/profile_sync_service_unittest.cc |
+++ b/chrome/browser/sync/profile_sync_service_unittest.cc |
@@ -59,11 +59,12 @@ class ProfileSyncServiceTestHarness { |
} |
void SetUp() { |
- profile.reset(new TestingProfile()); |
+ TestingProfile::Builder builder; |
+ builder.AddTestingFactory(ProfileOAuth2TokenServiceFactory::GetInstance(), |
+ FakeOAuth2TokenService::BuildTokenService); |
+ profile = builder.Build().Pass(); |
invalidation::InvalidationServiceFactory::GetInstance()-> |
SetBuildOnlyFakeInvalidatorsForTest(true); |
- ProfileOAuth2TokenServiceFactory::GetInstance()->SetTestingFactory( |
- profile.get(), FakeOAuth2TokenService::BuildTokenService); |
} |
void TearDown() { |