Chromium Code Reviews| 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_ |