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 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/prefs/pref_registry_simple.h" | 9 #include "base/prefs/pref_registry_simple.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 | 244 |
245 scoped_ptr<CloudPolicyClient> DeviceCloudPolicyManagerChromeOS::CreateClient() { | 245 scoped_ptr<CloudPolicyClient> DeviceCloudPolicyManagerChromeOS::CreateClient() { |
246 scoped_refptr<net::URLRequestContextGetter> request_context = | 246 scoped_refptr<net::URLRequestContextGetter> request_context = |
247 new SystemPolicyRequestContext( | 247 new SystemPolicyRequestContext( |
248 g_browser_process->system_request_context(), | 248 g_browser_process->system_request_context(), |
249 content::GetUserAgent(GURL( | 249 content::GetUserAgent(GURL( |
250 device_management_service_->GetServerUrl()))); | 250 device_management_service_->GetServerUrl()))); |
251 | 251 |
252 return make_scoped_ptr( | 252 return make_scoped_ptr( |
253 new CloudPolicyClient(GetMachineID(), GetMachineModel(), | 253 new CloudPolicyClient(GetMachineID(), GetMachineModel(), |
| 254 kPolicyVerificationKeyHash, |
254 USER_AFFILIATION_NONE, | 255 USER_AFFILIATION_NONE, |
255 device_status_provider_.get(), | 256 device_status_provider_.get(), |
256 device_management_service_, | 257 device_management_service_, |
257 request_context)); | 258 request_context)); |
258 } | 259 } |
259 | 260 |
260 void DeviceCloudPolicyManagerChromeOS::EnrollmentCompleted( | 261 void DeviceCloudPolicyManagerChromeOS::EnrollmentCompleted( |
261 const EnrollmentCallback& callback, | 262 const EnrollmentCallback& callback, |
262 EnrollmentStatus status) { | 263 EnrollmentStatus status) { |
263 if (status.status() == EnrollmentStatus::STATUS_SUCCESS) { | 264 if (status.status() == EnrollmentStatus::STATUS_SUCCESS) { |
(...skipping 21 matching lines...) Expand all Loading... |
285 core()->Connect(CreateClient()); | 286 core()->Connect(CreateClient()); |
286 core()->StartRefreshScheduler(); | 287 core()->StartRefreshScheduler(); |
287 core()->TrackRefreshDelayPref(local_state_, | 288 core()->TrackRefreshDelayPref(local_state_, |
288 prefs::kDevicePolicyRefreshRate); | 289 prefs::kDevicePolicyRefreshRate); |
289 attestation_policy_observer_.reset( | 290 attestation_policy_observer_.reset( |
290 new chromeos::attestation::AttestationPolicyObserver(client())); | 291 new chromeos::attestation::AttestationPolicyObserver(client())); |
291 } | 292 } |
292 } | 293 } |
293 | 294 |
294 } // namespace policy | 295 } // namespace policy |
OLD | NEW |