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

Unified Diff: chromeos/dbus/authpolicy_client.h

Issue 2433363004: Chromad: added AD Join ui, authpolicy_client (Closed)
Patch Set: Adress authpolicy_client comments Created 4 years, 2 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
Index: chromeos/dbus/authpolicy_client.h
diff --git a/chromeos/dbus/authpolicy_client.h b/chromeos/dbus/authpolicy_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..7696a640dc62e34e878acbcf80d9b8e126f57cd1
--- /dev/null
+++ b/chromeos/dbus/authpolicy_client.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#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.
+#define CHROMEOS_DBUS_AUTHPOLICY_CLIENT_H_
+
+#include <string>
+
+#include "base/callback.h"
+#include "chromeos/chromeos_export.h"
+#include "chromeos/dbus/dbus_client.h"
+
+namespace chromeos {
+
+// AuthPolicyClient is used to communicate with the org.chromium.AuthPolicy
+// sevice. All method should be called from the origin thread (UI thread) which
+// initializes the DBusThreadManager instance.
+class CHROMEOS_EXPORT AuthPolicyClient : public DBusClient {
+ public:
+ typedef base::Callback<void(int error_code)> JoinCallback;
+
+ ~AuthPolicyClient() override;
+
+ // Factory function, creates a new instance and returns ownership.
+ // For normal usage, access the singleton via DBusThreadManager::Get().
+ static AuthPolicyClient* Create();
+
+ // 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
+ // |password| are credentials of the AD user which have right to join the
+ // domain. |callback| is called after the method call succeeds.
+ virtual void JoinADDomain(const std::string& machine_name,
+ const std::string& user,
+ const std::string& password,
+ const JoinCallback& callback) = 0;
+
+ protected:
+ // Create() should be used instead.
+ AuthPolicyClient();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AuthPolicyClient);
+};
+
+} // namespace chromeos
+
+#endif // CHROMEOS_DBUS_AUTHPOLICY_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698