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

Unified Diff: chromeos/login/auth/authpolicy_login_helper.cc

Issue 2835473002: Chromad: Allow offline login. (Closed)
Patch Set: Add TryAuthenticateUser call Created 3 years, 8 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
« no previous file with comments | « chromeos/login/auth/authpolicy_login_helper.h ('k') | chromeos/login/auth/cryptohome_authenticator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
« no previous file with comments | « chromeos/login/auth/authpolicy_login_helper.h ('k') | chromeos/login/auth/cryptohome_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698