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

Unified Diff: chrome/test/data/webui/ntp4_browsertest.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: nullptr 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
« no previous file with comments | « chrome/browser/ui/webui/sync_internals_browsertest.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/ntp4_browsertest.cc
diff --git a/chrome/test/data/webui/ntp4_browsertest.cc b/chrome/test/data/webui/ntp4_browsertest.cc
index 2f6fc87ecd072bdfaa21839168834a8dc0d1b0af..7c292aba6571f119c3cdb60aa8388b5acc5d82b3 100644
--- a/chrome/test/data/webui/ntp4_browsertest.cc
+++ b/chrome/test/data/webui/ntp4_browsertest.cc
@@ -6,14 +6,16 @@
#include "base/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/pref_names.h"
+#include "components/signin/core/browser/signin_manager.h"
NTP4LoggedInWebUITest::NTP4LoggedInWebUITest() {}
NTP4LoggedInWebUITest::~NTP4LoggedInWebUITest() {}
void NTP4LoggedInWebUITest::SetLoginName(const std::string& name) {
- browser()->profile()->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
- name);
+ SigninManagerFactory::GetForProfile(browser()->profile())->
+ SetAuthenticatedUsername(name);
}
« no previous file with comments | « chrome/browser/ui/webui/sync_internals_browsertest.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698