diff options
Diffstat (limited to 'chrome/browser/sync/profile_sync_service_mock.cc')
-rw-r--r-- | chrome/browser/sync/profile_sync_service_mock.cc | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/chrome/browser/sync/profile_sync_service_mock.cc b/chrome/browser/sync/profile_sync_service_mock.cc index 694753a..e62e8f1 100644 --- a/chrome/browser/sync/profile_sync_service_mock.cc +++ b/chrome/browser/sync/profile_sync_service_mock.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/prefs/pref_service_mock_builder.h" +#include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/prefs/testing_pref_store.h" #include "chrome/browser/signin/signin_manager_factory.h" #include "chrome/browser/sync/profile_sync_service_mock.h" @@ -31,14 +31,7 @@ ProfileSyncServiceMock::~ProfileSyncServiceMock() { // static TestingProfile* ProfileSyncServiceMock::MakeSignedInTestingProfile() { TestingProfile* profile = new TestingProfile(); - TestingPrefStore* user_prefs = new TestingPrefStore(); - PrefService* prefs = PrefServiceMockBuilder() - .WithUserPrefs(user_prefs) - .Create(); - profile->SetPrefService(prefs); - // We just blew away our prefs, so reregister them. - SigninManagerFactory::GetInstance()->RegisterUserPrefs(prefs); - user_prefs->SetString(prefs::kGoogleServicesUsername, "foo"); + profile->GetPrefs()->SetString(prefs::kGoogleServicesUsername, "foo"); return profile; } |