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

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

Issue 2685793004: Chromad: Wire up displayName and givenName (Closed)
Patch Set: Combine SetDisplayName and SetGivenName into SetDisplayAndGiveName Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « chromeos/BUILD.gn ('k') | chromeos/dbus/auth_policy_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 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"
11 #include "chromeos/chromeos_export.h" 11 #include "chromeos/chromeos_export.h"
12 #include "chromeos/dbus/authpolicy/active_directory_account_data.pb.h"
12 #include "chromeos/dbus/dbus_client.h" 13 #include "chromeos/dbus/dbus_client.h"
13 #include "third_party/cros_system_api/dbus/service_constants.h" 14 #include "third_party/cros_system_api/dbus/service_constants.h"
14 15
15 class AccountId; 16 class AccountId;
16 17
17 namespace chromeos { 18 namespace chromeos {
18 19
19 // AuthPolicyClient is used to communicate with the org.chromium.AuthPolicy 20 // AuthPolicyClient is used to communicate with the org.chromium.AuthPolicy
20 // sevice. All method should be called from the origin thread (UI thread) which 21 // sevice. All method should be called from the origin thread (UI thread) which
21 // initializes the DBusThreadManager instance. 22 // initializes the DBusThreadManager instance.
22 class CHROMEOS_EXPORT AuthPolicyClient : public DBusClient { 23 class CHROMEOS_EXPORT AuthPolicyClient : public DBusClient {
23 public: 24 public:
24 // |user_id| is a unique id for the users. Using objectGUID from Active 25 // |user_id| is a unique id for the users. Using objectGUID from Active
25 // Directory server. 26 // Directory server.
26 using AuthCallback = base::Callback<void(authpolicy::ErrorType error, 27 using AuthCallback = base::Callback<void(
27 const std::string& user_id)>; 28 authpolicy::ErrorType error,
29 const authpolicy::ActiveDirectoryAccountData& account_data)>;
28 using JoinCallback = base::Callback<void(authpolicy::ErrorType error)>; 30 using JoinCallback = base::Callback<void(authpolicy::ErrorType error)>;
29 using RefreshPolicyCallback = base::Callback<void(bool success)>; 31 using RefreshPolicyCallback = base::Callback<void(bool success)>;
30 32
31 ~AuthPolicyClient() override; 33 ~AuthPolicyClient() override;
32 34
33 // Factory function, creates a new instance and returns ownership. 35 // Factory function, creates a new instance and returns ownership.
34 // For normal usage, access the singleton via DBusThreadManager::Get(). 36 // For normal usage, access the singleton via DBusThreadManager::Get().
35 static AuthPolicyClient* Create(); 37 static AuthPolicyClient* Create();
36 38
37 // Calls JoinADDomain. It runs "net ads join ..." which joins machine to 39 // Calls JoinADDomain. It runs "net ads join ..." which joins machine to
(...skipping 30 matching lines...) Expand all
68 // Create() should be used instead. 70 // Create() should be used instead.
69 AuthPolicyClient(); 71 AuthPolicyClient();
70 72
71 private: 73 private:
72 DISALLOW_COPY_AND_ASSIGN(AuthPolicyClient); 74 DISALLOW_COPY_AND_ASSIGN(AuthPolicyClient);
73 }; 75 };
74 76
75 } // namespace chromeos 77 } // namespace chromeos
76 78
77 #endif // CHROMEOS_DBUS_AUTH_POLICY_CLIENT_H_ 79 #endif // CHROMEOS_DBUS_AUTH_POLICY_CLIENT_H_
OLDNEW
« no previous file with comments | « chromeos/BUILD.gn ('k') | chromeos/dbus/auth_policy_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698