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

Side by Side Diff: chromeos/dbus/auth_policy_client.h

Issue 2475343002: Add UpstartClient (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | chromeos/dbus/auth_policy_client.cc » ('j') | chromeos/dbus/auth_policy_client.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 18 matching lines...) Expand all
29 class CHROMEOS_EXPORT AuthPolicyClient : public DBusClient { 29 class CHROMEOS_EXPORT AuthPolicyClient : public DBusClient {
30 public: 30 public:
31 using JoinCallback = base::Callback<void(int error_code)>; 31 using JoinCallback = base::Callback<void(int error_code)>;
32 32
33 ~AuthPolicyClient() override; 33 ~AuthPolicyClient() override;
34 34
35 // Factory function, creates a new instance and returns ownership. 35 // Factory function, creates a new instance and returns ownership.
36 // For normal usage, access the singleton via DBusThreadManager::Get(). 36 // For normal usage, access the singleton via DBusThreadManager::Get().
37 static AuthPolicyClient* Create(); 37 static AuthPolicyClient* Create();
38 38
39 // Signal upstart to start authpolicyd.
40 virtual void StartService() = 0;
39 // TODO(rsorokin): Write more descriptive comment. 41 // TODO(rsorokin): Write more descriptive comment.
40 // Calls JoinADDomain. Uses |machine_name| to join it to the domain. |user|, 42 // Calls JoinADDomain. Uses |machine_name| to join it to the domain. |user|,
41 // |password_fd| are credentials of the AD user which have right to join the 43 // |password_fd| are credentials of the AD user which have right to join the
42 // domain. |password_fd| is a file descriptor password is read from. 44 // domain. |password_fd| is a file descriptor password is read from.
43 // The caller should close it after the call. 45 // The caller should close it after the call.
44 // |callback| is called after the method call succeeds. 46 // |callback| is called after the method call succeeds.
45 virtual void JoinAdDomain(const std::string& machine_name, 47 virtual void JoinAdDomain(const std::string& machine_name,
46 const std::string& user, 48 const std::string& user,
47 int password_fd, 49 int password_fd,
48 const JoinCallback& callback) = 0; 50 const JoinCallback& callback) = 0;
49 51
50 protected: 52 protected:
51 // Create() should be used instead. 53 // Create() should be used instead.
52 AuthPolicyClient(); 54 AuthPolicyClient();
53 55
54 private: 56 private:
55 DISALLOW_COPY_AND_ASSIGN(AuthPolicyClient); 57 DISALLOW_COPY_AND_ASSIGN(AuthPolicyClient);
56 }; 58 };
57 59
58 } // namespace chromeos 60 } // namespace chromeos
59 61
60 #endif // CHROMEOS_DBUS_AUTH_POLICY_CLIENT_H_ 62 #endif // CHROMEOS_DBUS_AUTH_POLICY_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | chromeos/dbus/auth_policy_client.cc » ('j') | chromeos/dbus/auth_policy_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698