| 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 #ifndef CHROMEOS_DBUS_AUTH_POLICY_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_AUTH_POLICY_CLIENT_H_ |
| 6 #define CHROMEOS_DBUS_AUTH_POLICY_CLIENT_H_ | 6 #define CHROMEOS_DBUS_AUTH_POLICY_CLIENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "chromeos/chromeos_export.h" | 11 #include "chromeos/chromeos_export.h" |
| 12 #include "chromeos/dbus/dbus_client.h" | 12 #include "chromeos/dbus/dbus_client.h" |
| 13 | 13 |
| 14 // TODO(rsorokin): Switch to service constants when it's landed. | 14 // TODO(rsorokin): Switch to service constants when it's landed. |
| 15 // (see crbug.com/659732) | 15 // (see crbug.com/659732) |
| 16 namespace authpolicy { | 16 namespace authpolicy { |
| 17 namespace types { |
| 17 enum ADJoinErrorType { | 18 enum ADJoinErrorType { |
| 18 AD_JOIN_ERROR_NONE = 0, | 19 AD_JOIN_ERROR_NONE = 0, |
| 19 AD_JOIN_ERROR_UNKNOWN = 1, | 20 AD_JOIN_ERROR_UNKNOWN = 1, |
| 20 AD_JOIN_ERROR_DBUS_FAIL = 2, | 21 AD_JOIN_ERROR_DBUS_FAIL = 2, |
| 21 }; | 22 }; |
| 22 } | 23 } // namespace types |
| 24 } // namespace authpolicy |
| 23 | 25 |
| 24 namespace chromeos { | 26 namespace chromeos { |
| 25 | 27 |
| 26 // AuthPolicyClient is used to communicate with the org.chromium.AuthPolicy | 28 // AuthPolicyClient is used to communicate with the org.chromium.AuthPolicy |
| 27 // sevice. All method should be called from the origin thread (UI thread) which | 29 // sevice. All method should be called from the origin thread (UI thread) which |
| 28 // initializes the DBusThreadManager instance. | 30 // initializes the DBusThreadManager instance. |
| 29 class CHROMEOS_EXPORT AuthPolicyClient : public DBusClient { | 31 class CHROMEOS_EXPORT AuthPolicyClient : public DBusClient { |
| 30 public: | 32 public: |
| 31 using JoinCallback = base::Callback<void(int error_code)>; | 33 using JoinCallback = base::Callback<void(int error_code)>; |
| 32 using RefreshPolicyCallback = base::Callback<void(bool success)>; | 34 using RefreshPolicyCallback = base::Callback<void(bool success)>; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 63 // Create() should be used instead. | 65 // Create() should be used instead. |
| 64 AuthPolicyClient(); | 66 AuthPolicyClient(); |
| 65 | 67 |
| 66 private: | 68 private: |
| 67 DISALLOW_COPY_AND_ASSIGN(AuthPolicyClient); | 69 DISALLOW_COPY_AND_ASSIGN(AuthPolicyClient); |
| 68 }; | 70 }; |
| 69 | 71 |
| 70 } // namespace chromeos | 72 } // namespace chromeos |
| 71 | 73 |
| 72 #endif // CHROMEOS_DBUS_AUTH_POLICY_CLIENT_H_ | 74 #endif // CHROMEOS_DBUS_AUTH_POLICY_CLIENT_H_ |
| OLD | NEW |