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

Unified Diff: chromeos/dbus/authpolicy_client.h

Issue 2433363004: Chromad: added AD Join ui, authpolicy_client (Closed)
Patch Set: 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..9e2c6e53936a5e5db9db46e86abac069aab41b0c
--- /dev/null
+++ b/chromeos/dbus/authpolicy_client.h
@@ -0,0 +1,51 @@
+// 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_
+#define CHROMEOS_DBUS_AUTHPOLICY_CLIENT_H_
+
+#include <string>
+
+#include "base/callback.h"
+#include "base/macros.h"
+#include "chromeos/chromeos_export.h"
+#include "chromeos/dbus/dbus_client.h"
+#include "chromeos/dbus/dbus_method_call_status.h"
hashimoto 2016/10/24 03:01:18 Remove unused include.
Roman Sorokin (ftl) 2016/10/24 16:50:34 Done.
+
+namespace base {
+class DictionaryValue;
hashimoto 2016/10/24 03:01:18 Remove unused forward declarations.
Roman Sorokin (ftl) 2016/10/24 16:50:34 Done.
+}
+
+namespace dbus {
+class ObjectPath;
+}
+
+namespace chromeos {
+
hashimoto 2016/10/24 03:01:18 Add a comment to describe what this class is.
Roman Sorokin (ftl) 2016/10/24 16:50:34 Done.
+class CHROMEOS_EXPORT AuthpolicyClient : public DBusClient {
hashimoto 2016/10/24 03:01:18 Is "authpolicy" a word? Isn't AuthPolicy better?
Roman Sorokin (ftl) 2016/10/24 16:50:34 Done.
+ public:
+ typedef base::Callback<void(int)> JoinCallback;
hashimoto 2016/10/24 03:01:18 Please give the int parameter a name. Like: base:
Roman Sorokin (ftl) 2016/10/24 16:50:34 Done.
+
+ ~AuthpolicyClient() override;
+
+ // Factory function, creates a new instance and returns ownership.
+ // For normal usage, access the singleton via DBusThreadManager::Get().
+ static AuthpolicyClient* Create();
+
+ virtual void Join(const std::string& machine_name,
hashimoto 2016/10/24 03:01:18 Please add a comment about this method.
Roman Sorokin (ftl) 2016/10/24 16:50:34 Done.
+ 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