| 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 COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CLIENT_H_ | 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CLIENT_H_ |
| 6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CLIENT_H_ | 6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CLIENT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 // policy fetch is not automatically issued but can be requested by calling | 106 // policy fetch is not automatically issued but can be requested by calling |
| 107 // FetchPolicy(). | 107 // FetchPolicy(). |
| 108 virtual void SetupRegistration(const std::string& dm_token, | 108 virtual void SetupRegistration(const std::string& dm_token, |
| 109 const std::string& client_id); | 109 const std::string& client_id); |
| 110 | 110 |
| 111 // Attempts to register with the device management service. Results in a | 111 // Attempts to register with the device management service. Results in a |
| 112 // registration change or error notification. | 112 // registration change or error notification. |
| 113 virtual void Register( | 113 virtual void Register( |
| 114 enterprise_management::DeviceRegisterRequest::Type registration_type, | 114 enterprise_management::DeviceRegisterRequest::Type registration_type, |
| 115 enterprise_management::DeviceRegisterRequest::Flavor flavor, | 115 enterprise_management::DeviceRegisterRequest::Flavor flavor, |
| 116 enterprise_management::LicenseType::LicenseTypeEnum license_type, |
| 116 const std::string& auth_token, | 117 const std::string& auth_token, |
| 117 const std::string& client_id, | 118 const std::string& client_id, |
| 118 const std::string& requisition, | 119 const std::string& requisition, |
| 119 const std::string& current_state_key); | 120 const std::string& current_state_key); |
| 120 | 121 |
| 121 // Attempts to register with the device management service using a | 122 // Attempts to register with the device management service using a |
| 122 // registration certificate. Results in a registration change or | 123 // registration certificate. Results in a registration change or |
| 123 // error notification. | 124 // error notification. |
| 124 virtual void RegisterWithCertificate( | 125 virtual void RegisterWithCertificate( |
| 125 enterprise_management::DeviceRegisterRequest::Type registration_type, | 126 enterprise_management::DeviceRegisterRequest::Type registration_type, |
| 126 enterprise_management::DeviceRegisterRequest::Flavor flavor, | 127 enterprise_management::DeviceRegisterRequest::Flavor flavor, |
| 128 enterprise_management::LicenseType::LicenseTypeEnum license_type, |
| 127 const std::string& pem_certificate_chain, | 129 const std::string& pem_certificate_chain, |
| 128 const std::string& client_id, | 130 const std::string& client_id, |
| 129 const std::string& requisition, | 131 const std::string& requisition, |
| 130 const std::string& current_state_key); | 132 const std::string& current_state_key); |
| 131 | 133 |
| 132 // Sets information about a policy invalidation. Subsequent fetch operations | 134 // Sets information about a policy invalidation. Subsequent fetch operations |
| 133 // will use the given info, and callers can use fetched_invalidation_version | 135 // will use the given info, and callers can use fetched_invalidation_version |
| 134 // to determine which version of policy was fetched. | 136 // to determine which version of policy was fetched. |
| 135 void SetInvalidationInfo(int64_t version, const std::string& payload); | 137 void SetInvalidationInfo(int64_t version, const std::string& payload); |
| 136 | 138 |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 | 438 |
| 437 // Used to create tasks which run delayed on the UI thread. | 439 // Used to create tasks which run delayed on the UI thread. |
| 438 base::WeakPtrFactory<CloudPolicyClient> weak_ptr_factory_; | 440 base::WeakPtrFactory<CloudPolicyClient> weak_ptr_factory_; |
| 439 | 441 |
| 440 DISALLOW_COPY_AND_ASSIGN(CloudPolicyClient); | 442 DISALLOW_COPY_AND_ASSIGN(CloudPolicyClient); |
| 441 }; | 443 }; |
| 442 | 444 |
| 443 } // namespace policy | 445 } // namespace policy |
| 444 | 446 |
| 445 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CLIENT_H_ | 447 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CLIENT_H_ |
| OLD | NEW |