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

Unified Diff: chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc

Issue 2685793004: Chromad: Wire up displayName and givenName (Closed)
Patch Set: Combine SetDisplayName and SetGivenName into SetDisplayAndGiveName Created 3 years, 10 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/ui/webui/chromeos/login/gaia_screen_handler.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
index 8c9f635c0e44eb40c763f65a7310f46821a6c95c..04e0f026c5847eb46fca4d148e5d0ad4b153ab9c 100644
--- a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
@@ -503,15 +503,19 @@ AccountId GaiaScreenHandler::GetAccountId(
return account_id;
}
-void GaiaScreenHandler::DoAdAuth(const std::string& username,
- const Key& key,
- authpolicy::ErrorType error,
- const std::string& uid) {
+void GaiaScreenHandler::DoAdAuth(
+ const std::string& username,
+ const Key& key,
+ authpolicy::ErrorType error,
+ const authpolicy::ActiveDirectoryAccountData& account_data) {
switch (error) {
case authpolicy::ERROR_NONE: {
- DCHECK(!uid.empty());
- const AccountId account_id(
- GetAccountId(username, uid, AccountType::ACTIVE_DIRECTORY));
+ DCHECK(!account_data.has_account_id() &&
+ !account_data.account_id().empty());
+ const AccountId account_id(GetAccountId(
+ username, account_data.account_id(), AccountType::ACTIVE_DIRECTORY));
+ Delegate()->SetDisplayAndGivenName(account_data.display_name(),
+ account_data.given_name());
UserContext user_context(account_id);
user_context.SetKey(key);
user_context.SetAuthFlow(UserContext::AUTH_FLOW_ACTIVE_DIRECTORY);

Powered by Google App Engine
This is Rietveld 408576698