| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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/dbus/fake_auth_policy_client.h" | 5 #include "chromeos/dbus/fake_auth_policy_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 FakeAuthPolicyClient::FakeAuthPolicyClient() {} | 57 FakeAuthPolicyClient::FakeAuthPolicyClient() {} |
| 58 | 58 |
| 59 FakeAuthPolicyClient::~FakeAuthPolicyClient() {} | 59 FakeAuthPolicyClient::~FakeAuthPolicyClient() {} |
| 60 | 60 |
| 61 void FakeAuthPolicyClient::Init(dbus::Bus* bus) {} | 61 void FakeAuthPolicyClient::Init(dbus::Bus* bus) {} |
| 62 | 62 |
| 63 void FakeAuthPolicyClient::JoinAdDomain(const std::string& machine_name, | 63 void FakeAuthPolicyClient::JoinAdDomain(const std::string& machine_name, |
| 64 const std::string& user, | 64 const std::string& user, |
| 65 int password_fd, | 65 int password_fd, |
| 66 const JoinCallback& callback) { | 66 const JoinCallback& callback) { |
| 67 callback.Run(authpolicy::AD_JOIN_ERROR_NONE); | 67 callback.Run(authpolicy::types::AD_JOIN_ERROR_NONE); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void FakeAuthPolicyClient::RefreshDevicePolicy( | 70 void FakeAuthPolicyClient::RefreshDevicePolicy( |
| 71 const RefreshPolicyCallback& callback) { | 71 const RefreshPolicyCallback& callback) { |
| 72 if (!base::PostTaskAndReplyWithResult( | 72 if (!base::PostTaskAndReplyWithResult( |
| 73 base::WorkerPool::GetTaskRunner(false /* task_is_slow */).get(), | 73 base::WorkerPool::GetTaskRunner(false /* task_is_slow */).get(), |
| 74 FROM_HERE, base::Bind(&WriteDevicePolicyFile), callback)) { | 74 FROM_HERE, base::Bind(&WriteDevicePolicyFile), callback)) { |
| 75 callback.Run(false); | 75 callback.Run(false); |
| 76 } | 76 } |
| 77 } | 77 } |
| 78 | 78 |
| 79 void FakeAuthPolicyClient::RefreshUserPolicy( | 79 void FakeAuthPolicyClient::RefreshUserPolicy( |
| 80 const std::string& account_id, | 80 const std::string& account_id, |
| 81 const RefreshPolicyCallback& callback) { | 81 const RefreshPolicyCallback& callback) { |
| 82 callback.Run(true); | 82 callback.Run(true); |
| 83 } | 83 } |
| 84 | 84 |
| 85 } // namespace chromeos | 85 } // namespace chromeos |
| OLD | NEW |