| 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_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> |
| 10 #include <string> | 11 #include <string> |
| 11 | 12 |
| 12 #include "base/callback.h" | 13 #include "base/callback.h" |
| 13 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 14 #include "base/macros.h" | 15 #include "base/macros.h" |
| 15 #include "base/memory/scoped_ptr.h" | |
| 16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
| 17 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 17 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
| 18 #include "net/base/network_change_notifier.h" | 18 #include "net/base/network_change_notifier.h" |
| 19 #include "third_party/protobuf/src/google/protobuf/repeated_field.h" | 19 #include "third_party/protobuf/src/google/protobuf/repeated_field.h" |
| 20 | 20 |
| 21 class PrefRegistrySimple; | 21 class PrefRegistrySimple; |
| 22 class PrefService; | 22 class PrefService; |
| 23 | 23 |
| 24 namespace enterprise_management { | 24 namespace enterprise_management { |
| 25 class DeviceManagementResponse; | 25 class DeviceManagementResponse; |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 // Power of the maximum power-of-2 modulus that this client will accept from | 188 // Power of the maximum power-of-2 modulus that this client will accept from |
| 189 // a retry response from the server. | 189 // a retry response from the server. |
| 190 int power_limit_; | 190 int power_limit_; |
| 191 | 191 |
| 192 // Number of requests for a different modulus received from the server. | 192 // Number of requests for a different modulus received from the server. |
| 193 // Used to determine if the server keeps asking for different moduli. | 193 // Used to determine if the server keeps asking for different moduli. |
| 194 int modulus_updates_received_; | 194 int modulus_updates_received_; |
| 195 | 195 |
| 196 // Used to communicate with the device management service. | 196 // Used to communicate with the device management service. |
| 197 DeviceManagementService* device_management_service_; | 197 DeviceManagementService* device_management_service_; |
| 198 scoped_ptr<DeviceManagementRequestJob> request_job_; | 198 std::unique_ptr<DeviceManagementRequestJob> request_job_; |
| 199 | 199 |
| 200 // PrefService where the protocol's results are cached. | 200 // PrefService where the protocol's results are cached. |
| 201 PrefService* local_state_; | 201 PrefService* local_state_; |
| 202 | 202 |
| 203 // The request context to use to perform the auto enrollment request. | 203 // The request context to use to perform the auto enrollment request. |
| 204 scoped_refptr<net::URLRequestContextGetter> request_context_; | 204 scoped_refptr<net::URLRequestContextGetter> request_context_; |
| 205 | 205 |
| 206 // Times used to determine the duration of the protocol, and the extra time | 206 // Times used to determine the duration of the protocol, and the extra time |
| 207 // needed to complete after the signin was complete. | 207 // needed to complete after the signin was complete. |
| 208 // If |time_start_| is not null, the protocol is still running. | 208 // If |time_start_| is not null, the protocol is still running. |
| 209 // If |time_extra_start_| is not null, the protocol is still running but our | 209 // If |time_extra_start_| is not null, the protocol is still running but our |
| 210 // owner has relinquished ownership. | 210 // owner has relinquished ownership. |
| 211 base::Time time_start_; | 211 base::Time time_start_; |
| 212 base::Time time_extra_start_; | 212 base::Time time_extra_start_; |
| 213 | 213 |
| 214 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentClient); | 214 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentClient); |
| 215 }; | 215 }; |
| 216 | 216 |
| 217 } // namespace policy | 217 } // namespace policy |
| 218 | 218 |
| 219 #endif // CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_ | 219 #endif // CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_ |
| OLD | NEW |