Index: chrome/browser/sync/profile_sync_service_preference_unittest.cc |
diff --git a/chrome/browser/sync/profile_sync_service_preference_unittest.cc b/chrome/browser/sync/profile_sync_service_preference_unittest.cc |
index b34a6eb546525fb789e88f04aed920f429925911..79c916cc947de9862d56fab23086483906271ae2 100644 |
--- a/chrome/browser/sync/profile_sync_service_preference_unittest.cc |
+++ b/chrome/browser/sync/profile_sync_service_preference_unittest.cc |
@@ -13,6 +13,7 @@ |
#include "base/location.h" |
#include "base/stl_util.h" |
#include "base/strings/string_piece.h" |
+#include "chrome/browser/invalidation_service_factory.h" |
#include "chrome/browser/prefs/pref_model_associator.h" |
#include "chrome/browser/prefs/scoped_user_pref_update.h" |
#include "chrome/browser/signin/signin_manager.h" |
@@ -122,6 +123,9 @@ class ProfileSyncServicePreferenceTest |
AbstractProfileSyncServiceTest::SetUp(); |
profile_.reset(new TestingProfile()); |
profile_->CreateRequestContext(); |
+ InvalidationServiceFactory::GetInstance()->SetTestingFactory( |
+ profile_.get(), |
+ InvalidationServiceFactory::BuildTestServiceInstanceFor); |
prefs_ = profile_->GetTestingPrefService(); |
prefs_->registry()->RegisterStringPref( |
@@ -149,7 +153,8 @@ class ProfileSyncServicePreferenceTest |
if (sync_service_) |
return false; |
- SigninManager* signin = SigninManagerFactory::GetForProfile(profile_.get()); |
+ SigninManager* signin = |
+ SigninManagerFactory::GetForProfile(profile_.get()); |
signin->SetAuthenticatedUsername("test"); |
sync_service_ = static_cast<TestProfileSyncService*>( |
ProfileSyncServiceFactory::GetInstance()->SetTestingFactoryAndUse( |