| Index: chromeos/login/auth/authpolicy_login_helper.cc
|
| diff --git a/chromeos/login/auth/authpolicy_login_helper.cc b/chromeos/login/auth/authpolicy_login_helper.cc
|
| index 263cb96c6c97a07f29168302f693f0c003ccb949..19a1bbb05a81912b659351fd82e9e7c0e4cf1e2f 100644
|
| --- a/chromeos/login/auth/authpolicy_login_helper.cc
|
| +++ b/chromeos/login/auth/authpolicy_login_helper.cc
|
| @@ -30,6 +30,12 @@ base::ScopedFD GetDataReadPipe(const std::string& data) {
|
| return pipe_read_end;
|
| }
|
|
|
| +void AuthCallbackDoNothing(
|
| + authpolicy::ErrorType /* error */,
|
| + const authpolicy::ActiveDirectoryAccountData& /* account_data */) {
|
| + // Do nothing.
|
| +}
|
| +
|
| } // namespace
|
|
|
| AuthPolicyLoginHelper::AuthPolicyLoginHelper() : weak_factory_(this) {}
|
| @@ -46,15 +52,24 @@ void AuthPolicyLoginHelper::JoinAdDomain(const std::string& machine_name,
|
| }
|
|
|
| void AuthPolicyLoginHelper::AuthenticateUser(const std::string& username,
|
| + const std::string& object_guid,
|
| const std::string& password,
|
| AuthCallback callback) {
|
| DCHECK(!weak_factory_.HasWeakPtrs()) << "Another operation is in progress";
|
| chromeos::DBusThreadManager::Get()->GetAuthPolicyClient()->AuthenticateUser(
|
| - username, GetDataReadPipe(password).get(),
|
| + username, object_guid, GetDataReadPipe(password).get(),
|
| base::BindOnce(&AuthPolicyLoginHelper::OnAuthCallback,
|
| weak_factory_.GetWeakPtr(), base::Passed(&callback)));
|
| }
|
|
|
| +void AuthPolicyLoginHelper::TryAuthenticateUser(const std::string& username,
|
| + const std::string& object_guid,
|
| + const std::string& password) {
|
| + chromeos::DBusThreadManager::Get()->GetAuthPolicyClient()->AuthenticateUser(
|
| + username, object_guid, GetDataReadPipe(password).get(),
|
| + base::BindOnce(&AuthCallbackDoNothing));
|
| +}
|
| +
|
| void AuthPolicyLoginHelper::CancelRequestsAndRestart() {
|
| weak_factory_.InvalidateWeakPtrs();
|
| chromeos::DBusThreadManager::Get()
|
|
|