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

Unified Diff: chromeos/dbus/fake_auth_policy_client.cc

Issue 2841103002: Chromad: Add GetUserStatus call into AuthPolicyClient (Closed)
Patch Set: Fix test build 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/dbus/fake_auth_policy_client.h ('k') | chromeos/dbus/fake_auth_policy_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/fake_auth_policy_client.cc
diff --git a/chromeos/dbus/fake_auth_policy_client.cc b/chromeos/dbus/fake_auth_policy_client.cc
index bad9a11c011fcf3d11e26c145e378bcbd27a601e..2040907993f56c3f25b690aeb62c8adfab3040a2 100644
--- a/chromeos/dbus/fake_auth_policy_client.cc
+++ b/chromeos/dbus/fake_auth_policy_client.cc
@@ -109,20 +109,28 @@ void FakeAuthPolicyClient::AuthenticateUser(
int password_fd,
AuthCallback callback) {
authpolicy::ErrorType error = authpolicy::ERROR_NONE;
- authpolicy::ActiveDirectoryAccountData account_data;
+ authpolicy::ActiveDirectoryAccountInfo account_info;
if (!started_) {
LOG(ERROR) << "authpolicyd not started";
error = authpolicy::ERROR_DBUS_FAILURE;
} else {
if (auth_error_ == authpolicy::ERROR_NONE) {
if (object_guid.empty())
- account_data.set_account_id(base::MD5String(user_principal_name));
+ account_info.set_account_id(base::MD5String(user_principal_name));
else
- account_data.set_account_id(object_guid);
+ account_info.set_account_id(object_guid);
}
error = auth_error_;
}
- PostDelayedClosure(base::BindOnce(std::move(callback), error, account_data));
+ PostDelayedClosure(base::BindOnce(std::move(callback), error, account_info));
+}
+
+void FakeAuthPolicyClient::GetUserStatus(const std::string& object_guid,
+ GetUserStatusCallback callback) {
+ authpolicy::ActiveDirectoryUserStatus user_status;
+ user_status.mutable_account_info()->set_account_id(object_guid);
+ PostDelayedClosure(
+ base::BindOnce(std::move(callback), authpolicy::ERROR_NONE, user_status));
}
void FakeAuthPolicyClient::RefreshDevicePolicy(RefreshPolicyCallback callback) {
« no previous file with comments | « chromeos/dbus/fake_auth_policy_client.h ('k') | chromeos/dbus/fake_auth_policy_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698