| 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 4e4f710169aa03d41cefe9c432a8c15374e1ff22..43252742e9f8fe548c8cd3bf01f09580fffcf574 100644
|
| --- a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
|
| +++ b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
|
| @@ -267,8 +267,7 @@
|
| IDS_LOGIN_CONSUMER_MANAGEMENT_ENROLLMENT);
|
|
|
| // Strings used by the SAML fatal error dialog.
|
| - builder->Add("fatalErrorMessageNoAccountDetails",
|
| - IDS_LOGIN_FATAL_ERROR_NO_ACCOUNT_DETAILS);
|
| + builder->Add("fatalErrorMessageNoEmail", IDS_LOGIN_FATAL_ERROR_NO_EMAIL);
|
| builder->Add("fatalErrorMessageNoPassword",
|
| IDS_LOGIN_FATAL_ERROR_NO_PASSWORD);
|
| builder->Add("fatalErrorMessageVerificationFailed",
|
| @@ -320,29 +319,23 @@
|
| }
|
|
|
| void GaiaScreenHandler::HandleCompleteAuthentication(
|
| - const std::string& gaia_id,
|
| const std::string& email,
|
| const std::string& password,
|
| const std::string& auth_code) {
|
| if (!Delegate())
|
| return;
|
| -
|
| - DCHECK(!email.empty());
|
| - DCHECK(!gaia_id.empty());
|
| Delegate()->SetDisplayEmail(gaia::SanitizeEmail(email));
|
| UserContext user_context(email);
|
| - user_context.SetGaiaID(gaia_id);
|
| user_context.SetKey(Key(password));
|
| user_context.SetAuthCode(auth_code);
|
| Delegate()->CompleteLogin(user_context);
|
| }
|
|
|
| -void GaiaScreenHandler::HandleCompleteLogin(const std::string& gaia_id,
|
| - const std::string& typed_email,
|
| +void GaiaScreenHandler::HandleCompleteLogin(const std::string& typed_email,
|
| const std::string& password,
|
| bool using_saml) {
|
| if (!is_enrolling_consumer_management_) {
|
| - DoCompleteLogin(gaia_id, typed_email, password, using_saml);
|
| + DoCompleteLogin(typed_email, password, using_saml);
|
| return;
|
| }
|
|
|
| @@ -361,7 +354,6 @@
|
| consumer_management_->SetOwner(owner_email,
|
| base::Bind(&GaiaScreenHandler::OnSetOwnerDone,
|
| weak_factory_.GetWeakPtr(),
|
| - gaia_id,
|
| typed_email,
|
| password,
|
| using_saml));
|
| @@ -425,8 +417,7 @@
|
| SubmitLoginFormForTest();
|
| }
|
|
|
| -void GaiaScreenHandler::OnSetOwnerDone(const std::string& gaia_id,
|
| - const std::string& typed_email,
|
| +void GaiaScreenHandler::OnSetOwnerDone(const std::string& typed_email,
|
| const std::string& password,
|
| bool using_saml,
|
| bool success) {
|
| @@ -442,11 +433,10 @@
|
| // We should continue logging in the user, as there's not much we can do
|
| // here.
|
| }
|
| - DoCompleteLogin(gaia_id, typed_email, password, using_saml);
|
| -}
|
| -
|
| -void GaiaScreenHandler::DoCompleteLogin(const std::string& gaia_id,
|
| - const std::string& typed_email,
|
| + DoCompleteLogin(typed_email, password, using_saml);
|
| +}
|
| +
|
| +void GaiaScreenHandler::DoCompleteLogin(const std::string& typed_email,
|
| const std::string& password,
|
| bool using_saml) {
|
| if (!Delegate())
|
| @@ -455,12 +445,9 @@
|
| if (using_saml && !using_saml_api_)
|
| RecordSAMLScrapingVerificationResultInHistogram(true);
|
|
|
| - DCHECK(!typed_email.empty());
|
| - DCHECK(!gaia_id.empty());
|
| const std::string sanitized_email = gaia::SanitizeEmail(typed_email);
|
| Delegate()->SetDisplayEmail(sanitized_email);
|
| UserContext user_context(sanitized_email);
|
| - user_context.SetGaiaID(gaia_id);
|
| user_context.SetKey(Key(password));
|
| user_context.SetAuthFlow(using_saml
|
| ? UserContext::AUTH_FLOW_GAIA_WITH_SAML
|
|
|