| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/gaia_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h" |
| 6 | 6 |
| 7 #include "ash/system/devicetype_utils.h" | 7 #include "ash/system/devicetype_utils.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/guid.h" | 10 #include "base/guid.h" |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 } | 591 } |
| 592 } | 592 } |
| 593 | 593 |
| 594 void GaiaScreenHandler::HandleCompleteAdAuthentication( | 594 void GaiaScreenHandler::HandleCompleteAdAuthentication( |
| 595 const std::string& username, | 595 const std::string& username, |
| 596 const std::string& password) { | 596 const std::string& password) { |
| 597 Delegate()->SetDisplayEmail(username); | 597 Delegate()->SetDisplayEmail(username); |
| 598 set_populated_email(username); | 598 set_populated_email(username); |
| 599 DCHECK(authpolicy_login_helper_); | 599 DCHECK(authpolicy_login_helper_); |
| 600 authpolicy_login_helper_->AuthenticateUser( | 600 authpolicy_login_helper_->AuthenticateUser( |
| 601 username, password, | 601 username, std::string() /* object_guid */, password, |
| 602 base::BindOnce(&GaiaScreenHandler::DoAdAuth, weak_factory_.GetWeakPtr(), | 602 base::BindOnce(&GaiaScreenHandler::DoAdAuth, weak_factory_.GetWeakPtr(), |
| 603 username, Key(password))); | 603 username, Key(password))); |
| 604 } | 604 } |
| 605 | 605 |
| 606 void GaiaScreenHandler::HandleCompleteAdPasswordChange( | 606 void GaiaScreenHandler::HandleCompleteAdPasswordChange( |
| 607 const std::string& username, | 607 const std::string& username, |
| 608 const std::string& old_password, | 608 const std::string& old_password, |
| 609 const std::string& new_password) { | 609 const std::string& new_password) { |
| 610 Delegate()->SetDisplayEmail(username); | 610 Delegate()->SetDisplayEmail(username); |
| 611 set_populated_email(username); | 611 set_populated_email(username); |
| 612 | 612 |
| 613 DCHECK(authpolicy_login_helper_); | 613 DCHECK(authpolicy_login_helper_); |
| 614 authpolicy_login_helper_->AuthenticateUser( | 614 authpolicy_login_helper_->AuthenticateUser( |
| 615 username, old_password + "\n" + new_password + "\n" + new_password, | 615 username, std::string() /* object_guid */, |
| 616 old_password + "\n" + new_password + "\n" + new_password, |
| 616 base::Bind(&GaiaScreenHandler::DoAdAuth, weak_factory_.GetWeakPtr(), | 617 base::Bind(&GaiaScreenHandler::DoAdAuth, weak_factory_.GetWeakPtr(), |
| 617 username, Key(new_password))); | 618 username, Key(new_password))); |
| 618 } | 619 } |
| 619 | 620 |
| 620 void GaiaScreenHandler::HandleCancelActiveDirectoryAuth() { | 621 void GaiaScreenHandler::HandleCancelActiveDirectoryAuth() { |
| 621 DCHECK(authpolicy_login_helper_); | 622 DCHECK(authpolicy_login_helper_); |
| 622 authpolicy_login_helper_->CancelRequestsAndRestart(); | 623 authpolicy_login_helper_->CancelRequestsAndRestart(); |
| 623 } | 624 } |
| 624 | 625 |
| 625 void GaiaScreenHandler::HandleCompleteAuthentication( | 626 void GaiaScreenHandler::HandleCompleteAuthentication( |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { | 975 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { |
| 975 return signin_screen_handler_->delegate_; | 976 return signin_screen_handler_->delegate_; |
| 976 } | 977 } |
| 977 | 978 |
| 978 bool GaiaScreenHandler::IsRestrictiveProxy() const { | 979 bool GaiaScreenHandler::IsRestrictiveProxy() const { |
| 979 return !disable_restrictive_proxy_check_for_test_ && | 980 return !disable_restrictive_proxy_check_for_test_ && |
| 980 !IsOnline(captive_portal_status_); | 981 !IsOnline(captive_portal_status_); |
| 981 } | 982 } |
| 982 | 983 |
| 983 } // namespace chromeos | 984 } // namespace chromeos |
| OLD | NEW |