OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "chromeos/login/auth/authpolicy_login_helper.h" | 5 #include "chromeos/login/auth/authpolicy_login_helper.h" |
6 | 6 |
7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/task_scheduler/post_task.h" | 8 #include "base/task_scheduler/post_task.h" |
9 #include "chromeos/dbus/auth_policy_client.h" | 9 #include "chromeos/dbus/auth_policy_client.h" |
10 #include "chromeos/dbus/dbus_thread_manager.h" | 10 #include "chromeos/dbus/dbus_thread_manager.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 if (!base::WriteFileDescriptor(pipe_write_end.get(), data.c_str(), | 25 if (!base::WriteFileDescriptor(pipe_write_end.get(), data.c_str(), |
26 data.size())) { | 26 data.size())) { |
27 DLOG(ERROR) << "Failed to write to pipe"; | 27 DLOG(ERROR) << "Failed to write to pipe"; |
28 return base::ScopedFD(); | 28 return base::ScopedFD(); |
29 } | 29 } |
30 return pipe_read_end; | 30 return pipe_read_end; |
31 } | 31 } |
32 | 32 |
33 void AuthCallbackDoNothing( | 33 void AuthCallbackDoNothing( |
34 authpolicy::ErrorType /* error */, | 34 authpolicy::ErrorType /* error */, |
35 const authpolicy::ActiveDirectoryAccountData& /* account_data */) { | 35 const authpolicy::ActiveDirectoryAccountInfo& /* account_info */) { |
36 // Do nothing. | 36 // Do nothing. |
37 } | 37 } |
38 | 38 |
39 } // namespace | 39 } // namespace |
40 | 40 |
41 AuthPolicyLoginHelper::AuthPolicyLoginHelper() : weak_factory_(this) {} | 41 AuthPolicyLoginHelper::AuthPolicyLoginHelper() : weak_factory_(this) {} |
42 | 42 |
43 void AuthPolicyLoginHelper::JoinAdDomain(const std::string& machine_name, | 43 void AuthPolicyLoginHelper::JoinAdDomain(const std::string& machine_name, |
44 const std::string& username, | 44 const std::string& username, |
45 const std::string& password, | 45 const std::string& password, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 } | 78 } |
79 | 79 |
80 void AuthPolicyLoginHelper::OnJoinCallback(JoinCallback callback, | 80 void AuthPolicyLoginHelper::OnJoinCallback(JoinCallback callback, |
81 authpolicy::ErrorType error) { | 81 authpolicy::ErrorType error) { |
82 std::move(callback).Run(error); | 82 std::move(callback).Run(error); |
83 } | 83 } |
84 | 84 |
85 void AuthPolicyLoginHelper::OnAuthCallback( | 85 void AuthPolicyLoginHelper::OnAuthCallback( |
86 AuthCallback callback, | 86 AuthCallback callback, |
87 authpolicy::ErrorType error, | 87 authpolicy::ErrorType error, |
88 const authpolicy::ActiveDirectoryAccountData& account_data) { | 88 const authpolicy::ActiveDirectoryAccountInfo& account_info) { |
89 std::move(callback).Run(error, account_data); | 89 std::move(callback).Run(error, account_info); |
90 } | 90 } |
91 | 91 |
92 AuthPolicyLoginHelper::~AuthPolicyLoginHelper() {} | 92 AuthPolicyLoginHelper::~AuthPolicyLoginHelper() {} |
93 | 93 |
94 } // namespace chromeos | 94 } // namespace chromeos |
OLD | NEW |