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

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

Issue 1229883003: ChromeOS: should send old user GAPS cookie to GAIA on user reauthentication. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after review. Created 5 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/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 e71da5ac5ad0c8feda8938ab4b068de21232d264..47b2185e0e597b3856d65362cb4ba59fb82c6d56 100644
--- a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
@@ -217,6 +217,7 @@ void GaiaScreenHandler::LoadGaiaWithVersion(
params.SetString("email", context.email);
params.SetBoolean("isEnrollingConsumerManagement",
is_enrolling_consumer_management);
+ params.SetString("gapsCookie", context.gaps_cookie);
UpdateAuthParams(&params,
context.has_users,
@@ -494,7 +495,8 @@ void GaiaScreenHandler::HandleCompleteAuthentication(
const std::string& email,
const std::string& password,
const std::string& auth_code,
- bool using_saml) {
+ bool using_saml,
+ const std::string& gaps_cookie) {
if (!Delegate())
return;
@@ -511,6 +513,7 @@ void GaiaScreenHandler::HandleCompleteAuthentication(
user_context.SetAuthFlow(using_saml
? UserContext::AUTH_FLOW_GAIA_WITH_SAML
: UserContext::AUTH_FLOW_GAIA_WITHOUT_SAML);
+ user_context.SetGAPSCookie(gaps_cookie);
Delegate()->CompleteLogin(user_context);
}
@@ -932,6 +935,12 @@ void GaiaScreenHandler::LoadAuthExtension(bool force,
context.has_users = !Delegate()->GetUsers().empty();
}
+ if (!context.email.empty()) {
+ context.gaps_cookie =
+ user_manager::UserManager::Get()->GetKnownUserGAPSCookie(
+ gaia::CanonicalizeEmail(context.email));
+ }
+
populated_email_.clear();
LoadGaia(context);

Powered by Google App Engine
This is Rietveld 408576698