Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Side by Side Diff: chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc

Issue 116273002: Added support for signed policy blobs on desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for ios. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698