OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_POLICY_CLOUD_CLOUD_POLICY_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_CLOUD_POLICY_CLIENT_H_ |
6 #define CHROME_BROWSER_POLICY_CLOUD_CLOUD_POLICY_CLIENT_H_ | 6 #define CHROME_BROWSER_POLICY_CLOUD_CLOUD_POLICY_CLIENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // FetchPolicy(). | 94 // FetchPolicy(). |
95 virtual void SetupRegistration(const std::string& dm_token, | 95 virtual void SetupRegistration(const std::string& dm_token, |
96 const std::string& client_id); | 96 const std::string& client_id); |
97 | 97 |
98 // Attempts to register with the device management service. Results in a | 98 // Attempts to register with the device management service. Results in a |
99 // registration change or error notification. | 99 // registration change or error notification. |
100 virtual void Register( | 100 virtual void Register( |
101 enterprise_management::DeviceRegisterRequest::Type registration_type, | 101 enterprise_management::DeviceRegisterRequest::Type registration_type, |
102 const std::string& auth_token, | 102 const std::string& auth_token, |
103 const std::string& client_id, | 103 const std::string& client_id, |
104 bool is_auto_enrollment); | 104 bool is_auto_enrollment, |
| 105 const std::string& requisition); |
105 | 106 |
106 // Requests a policy fetch. The client being registered is a prerequisite to | 107 // Requests a policy fetch. The client being registered is a prerequisite to |
107 // this operation and this call will CHECK if the client is not in registered | 108 // this operation and this call will CHECK if the client is not in registered |
108 // state. FetchPolicy() triggers a policy fetch from the cloud. A policy | 109 // state. FetchPolicy() triggers a policy fetch from the cloud. A policy |
109 // change notification is reported to the observers and the new policy blob | 110 // change notification is reported to the observers and the new policy blob |
110 // can be retrieved once the policy fetch operation completes. In case of | 111 // can be retrieved once the policy fetch operation completes. In case of |
111 // multiple requests to fetch policy, new requests will cancel any pending | 112 // multiple requests to fetch policy, new requests will cancel any pending |
112 // requests and the latest request will eventually trigger notifications. | 113 // requests and the latest request will eventually trigger notifications. |
113 virtual void FetchPolicy(); | 114 virtual void FetchPolicy(); |
114 | 115 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 | 258 |
258 ObserverList<Observer, true> observers_; | 259 ObserverList<Observer, true> observers_; |
259 | 260 |
260 private: | 261 private: |
261 DISALLOW_COPY_AND_ASSIGN(CloudPolicyClient); | 262 DISALLOW_COPY_AND_ASSIGN(CloudPolicyClient); |
262 }; | 263 }; |
263 | 264 |
264 } // namespace policy | 265 } // namespace policy |
265 | 266 |
266 #endif // CHROME_BROWSER_POLICY_CLOUD_CLOUD_POLICY_CLIENT_H_ | 267 #endif // CHROME_BROWSER_POLICY_CLOUD_CLOUD_POLICY_CLIENT_H_ |
OLD | NEW |