Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROMEOS_DBUS_AUTHPOLICY_CLIENT_H_ | |
|
hashimoto
2016/10/26 06:11:12
The file name should be auth_policy_client.h
The s
Roman Sorokin (ftl)
2016/10/26 18:45:35
Done.
| |
| 6 #define CHROMEOS_DBUS_AUTHPOLICY_CLIENT_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/callback.h" | |
| 11 #include "chromeos/chromeos_export.h" | |
| 12 #include "chromeos/dbus/dbus_client.h" | |
| 13 | |
| 14 namespace chromeos { | |
| 15 | |
| 16 // AuthPolicyClient is used to communicate with the org.chromium.AuthPolicy | |
| 17 // sevice. All method should be called from the origin thread (UI thread) which | |
| 18 // initializes the DBusThreadManager instance. | |
| 19 class CHROMEOS_EXPORT AuthPolicyClient : public DBusClient { | |
| 20 public: | |
| 21 typedef base::Callback<void(int error_code)> JoinCallback; | |
| 22 | |
| 23 ~AuthPolicyClient() override; | |
| 24 | |
| 25 // Factory function, creates a new instance and returns ownership. | |
| 26 // For normal usage, access the singleton via DBusThreadManager::Get(). | |
| 27 static AuthPolicyClient* Create(); | |
| 28 | |
| 29 // Calls JoinADDomain. Uses |machine_name| to join it to the domain. |user|, | |
|
hashimoto
2016/10/26 06:11:12
Could you add some words to make it clear what "jo
Roman Sorokin (ftl)
2016/10/26 18:45:35
Can't do that for now. Added TODO to change it in
| |
| 30 // |password| are credentials of the AD user which have right to join the | |
| 31 // domain. |callback| is called after the method call succeeds. | |
| 32 virtual void JoinADDomain(const std::string& machine_name, | |
| 33 const std::string& user, | |
| 34 const std::string& password, | |
| 35 const JoinCallback& callback) = 0; | |
| 36 | |
| 37 protected: | |
| 38 // Create() should be used instead. | |
| 39 AuthPolicyClient(); | |
| 40 | |
| 41 private: | |
| 42 DISALLOW_COPY_AND_ASSIGN(AuthPolicyClient); | |
| 43 }; | |
| 44 | |
| 45 } // namespace chromeos | |
| 46 | |
| 47 #endif // CHROMEOS_DBUS_AUTHPOLICY_CLIENT_H_ | |
| OLD | NEW |