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_ENROLLMENT_HANDLER_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_ENROLLMENT_HANDLER_CHROMEOS_H_ |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_ENROLLMENT_HANDLER_CHROMEOS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_ENROLLMENT_HANDLER_CHROMEOS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 // enrollment handler. |allowed_device_modes| determines what device modes | 48 // enrollment handler. |allowed_device_modes| determines what device modes |
49 // are acceptable. If the mode specified by the server is not acceptable, | 49 // are acceptable. If the mode specified by the server is not acceptable, |
50 // enrollment will fail with an EnrollmentStatus indicating | 50 // enrollment will fail with an EnrollmentStatus indicating |
51 // STATUS_REGISTRATION_BAD_MODE. | 51 // STATUS_REGISTRATION_BAD_MODE. |
52 EnrollmentHandlerChromeOS(DeviceCloudPolicyStoreChromeOS* store, | 52 EnrollmentHandlerChromeOS(DeviceCloudPolicyStoreChromeOS* store, |
53 EnterpriseInstallAttributes* install_attributes, | 53 EnterpriseInstallAttributes* install_attributes, |
54 scoped_ptr<CloudPolicyClient> client, | 54 scoped_ptr<CloudPolicyClient> client, |
55 const std::string& auth_token, | 55 const std::string& auth_token, |
56 const std::string& client_id, | 56 const std::string& client_id, |
57 bool is_auto_enrollment, | 57 bool is_auto_enrollment, |
| 58 const std::string& requisition, |
58 const AllowedDeviceModes& allowed_device_modes, | 59 const AllowedDeviceModes& allowed_device_modes, |
59 const EnrollmentCallback& completion_callback); | 60 const EnrollmentCallback& completion_callback); |
60 virtual ~EnrollmentHandlerChromeOS(); | 61 virtual ~EnrollmentHandlerChromeOS(); |
61 | 62 |
62 // Starts the enrollment process and reports the result to | 63 // Starts the enrollment process and reports the result to |
63 // |completion_callback_|. | 64 // |completion_callback_|. |
64 void StartEnrollment(); | 65 void StartEnrollment(); |
65 | 66 |
66 // Releases the client. | 67 // Releases the client. |
67 scoped_ptr<CloudPolicyClient> ReleaseClient(); | 68 scoped_ptr<CloudPolicyClient> ReleaseClient(); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 137 |
137 DeviceCloudPolicyStoreChromeOS* store_; | 138 DeviceCloudPolicyStoreChromeOS* store_; |
138 EnterpriseInstallAttributes* install_attributes_; | 139 EnterpriseInstallAttributes* install_attributes_; |
139 scoped_ptr<CloudPolicyClient> client_; | 140 scoped_ptr<CloudPolicyClient> client_; |
140 scoped_ptr<gaia::GaiaOAuthClient> gaia_oauth_client_; | 141 scoped_ptr<gaia::GaiaOAuthClient> gaia_oauth_client_; |
141 | 142 |
142 std::string auth_token_; | 143 std::string auth_token_; |
143 std::string client_id_; | 144 std::string client_id_; |
144 std::string robot_refresh_token_; | 145 std::string robot_refresh_token_; |
145 bool is_auto_enrollment_; | 146 bool is_auto_enrollment_; |
| 147 std::string requisition_; |
146 AllowedDeviceModes allowed_device_modes_; | 148 AllowedDeviceModes allowed_device_modes_; |
147 EnrollmentCallback completion_callback_; | 149 EnrollmentCallback completion_callback_; |
148 | 150 |
149 // The device mode as received in the registration request. | 151 // The device mode as received in the registration request. |
150 DeviceMode device_mode_; | 152 DeviceMode device_mode_; |
151 | 153 |
152 // The validated policy response info to be installed in the store. | 154 // The validated policy response info to be installed in the store. |
153 scoped_ptr<enterprise_management::PolicyFetchResponse> policy_; | 155 scoped_ptr<enterprise_management::PolicyFetchResponse> policy_; |
154 std::string username_; | 156 std::string username_; |
155 std::string device_id_; | 157 std::string device_id_; |
156 | 158 |
157 // Current enrollment step. | 159 // Current enrollment step. |
158 EnrollmentStep enrollment_step_; | 160 EnrollmentStep enrollment_step_; |
159 | 161 |
160 // Total amount of time in milliseconds spent waiting for lockbox | 162 // Total amount of time in milliseconds spent waiting for lockbox |
161 // initialization. | 163 // initialization. |
162 int lockbox_init_duration_; | 164 int lockbox_init_duration_; |
163 | 165 |
164 base::WeakPtrFactory<EnrollmentHandlerChromeOS> weak_factory_; | 166 base::WeakPtrFactory<EnrollmentHandlerChromeOS> weak_factory_; |
165 | 167 |
166 DISALLOW_COPY_AND_ASSIGN(EnrollmentHandlerChromeOS); | 168 DISALLOW_COPY_AND_ASSIGN(EnrollmentHandlerChromeOS); |
167 }; | 169 }; |
168 | 170 |
169 } // namespace policy | 171 } // namespace policy |
170 | 172 |
171 #endif // CHROME_BROWSER_CHROMEOS_POLICY_ENROLLMENT_HANDLER_CHROMEOS_H_ | 173 #endif // CHROME_BROWSER_CHROMEOS_POLICY_ENROLLMENT_HANDLER_CHROMEOS_H_ |
OLD | NEW |