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

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

Issue 10693022: Add support for loading user cloud policy on desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaked some comments after self-review. Created 8 years, 5 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_mock.cc
diff --git a/chrome/browser/sync/profile_sync_service_mock.cc b/chrome/browser/sync/profile_sync_service_mock.cc
index 694753a93e8c9971fa6c7c1d82339bcc2b576401..d00aca0ae77da0b37ff5830843e1ba6e663c581d 100644
--- a/chrome/browser/sync/profile_sync_service_mock.cc
+++ b/chrome/browser/sync/profile_sync_service_mock.cc
@@ -2,6 +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.h"
#include "chrome/browser/prefs/pref_service_mock_builder.h"
Mattias Nissler (ping if slow) 2012/08/03 12:19:08 not needed any longer?
Andrew T Wilson (Slow) 2012/08/04 00:54:41 Done.
#include "chrome/browser/prefs/testing_pref_store.h"
#include "chrome/browser/signin/signin_manager_factory.h"
@@ -31,14 +32,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;
}

Powered by Google App Engine
This is Rietveld 408576698