OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1004 gaia_screen_handler_->UpdateGaia(context); | 1004 gaia_screen_handler_->UpdateGaia(context); |
1005 UpdateAddButtonStatus(); | 1005 UpdateAddButtonStatus(); |
1006 } | 1006 } |
1007 | 1007 |
1008 void SigninScreenHandler::UpdateAddButtonStatus() { | 1008 void SigninScreenHandler::UpdateAddButtonStatus() { |
1009 CallJS("cr.ui.login.DisplayManager.updateAddUserButtonStatus", | 1009 CallJS("cr.ui.login.DisplayManager.updateAddUserButtonStatus", |
1010 AllWhitelistedUsersPresent()); | 1010 AllWhitelistedUsersPresent()); |
1011 } | 1011 } |
1012 | 1012 |
1013 void SigninScreenHandler::HandleCompleteLogin(const std::string& typed_email, | 1013 void SigninScreenHandler::HandleCompleteLogin(const std::string& typed_email, |
1014 const std::string& password, | 1014 const std::string& password) { |
1015 bool using_saml) { | |
1016 if (!delegate_) | 1015 if (!delegate_) |
1017 return; | 1016 return; |
1018 | |
1019 const std::string sanitized_email = gaia::SanitizeEmail(typed_email); | 1017 const std::string sanitized_email = gaia::SanitizeEmail(typed_email); |
1020 delegate_->SetDisplayEmail(sanitized_email); | 1018 delegate_->SetDisplayEmail(sanitized_email); |
1021 delegate_->CompleteLogin(UserContext( | 1019 delegate_->CompleteLogin(UserContext(sanitized_email, |
1022 sanitized_email, | 1020 password, |
1023 password, | 1021 std::string())); // auth_code |
1024 std::string(), // auth_code | |
1025 std::string(), // username_hash | |
1026 true, // using_oauth | |
1027 using_saml ? UserContext::AUTH_FLOW_GAIA_WITH_SAML | |
1028 : UserContext::AUTH_FLOW_GAIA_WITHOUT_SAML)); | |
1029 | 1022 |
1030 if (test_expects_complete_login_) { | 1023 if (test_expects_complete_login_) { |
1031 VLOG(2) << "Complete test login for " << typed_email | 1024 VLOG(2) << "Complete test login for " << typed_email |
1032 << ", requested=" << test_user_; | 1025 << ", requested=" << test_user_; |
1033 | 1026 |
1034 test_expects_complete_login_ = false; | 1027 test_expects_complete_login_ = false; |
1035 test_user_.clear(); | 1028 test_user_.clear(); |
1036 test_pass_.clear(); | 1029 test_pass_.clear(); |
1037 } | 1030 } |
1038 } | 1031 } |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1645 DCHECK(gaia_screen_handler_); | 1638 DCHECK(gaia_screen_handler_); |
1646 return gaia_screen_handler_->frame_state(); | 1639 return gaia_screen_handler_->frame_state(); |
1647 } | 1640 } |
1648 | 1641 |
1649 net::Error SigninScreenHandler::FrameError() const { | 1642 net::Error SigninScreenHandler::FrameError() const { |
1650 DCHECK(gaia_screen_handler_); | 1643 DCHECK(gaia_screen_handler_); |
1651 return gaia_screen_handler_->frame_error(); | 1644 return gaia_screen_handler_->frame_error(); |
1652 } | 1645 } |
1653 | 1646 |
1654 } // namespace chromeos | 1647 } // namespace chromeos |
OLD | NEW |