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

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

Issue 763673002: Replace direct access to kGoogleServicesUsername with calls to SigninManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years 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 f2fc5c1d33dc09a5e0bb31ab0c5b10baba6e3815..1bdcc4dd1fb10e569443ba6323c62b8f129da520 100644
--- a/chrome/browser/sync/profile_sync_service_mock.cc
+++ b/chrome/browser/sync/profile_sync_service_mock.cc
@@ -46,7 +46,8 @@ ProfileSyncServiceMock::~ProfileSyncServiceMock() {
// static
TestingProfile* ProfileSyncServiceMock::MakeSignedInTestingProfile() {
TestingProfile* profile = new TestingProfile();
- profile->GetPrefs()->SetString(prefs::kGoogleServicesUsername, "foo");
+ SigninManagerFactory::GetForProfile(profile)->
+ SetAuthenticatedUsername("foo");
return profile;
}

Powered by Google App Engine
This is Rietveld 408576698