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

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

Issue 99433004: Add a header when fetching pages under the DMServer URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed per willchan's feedback Created 7 years 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 std::string DeviceCloudPolicyManagerChromeOS::GetRobotAccountId() { 240 std::string DeviceCloudPolicyManagerChromeOS::GetRobotAccountId() {
241 const enterprise_management::PolicyData* policy = device_store_->policy(); 241 const enterprise_management::PolicyData* policy = device_store_->policy();
242 return policy ? policy->service_account_identity() : std::string(); 242 return policy ? policy->service_account_identity() : std::string();
243 } 243 }
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 USER_AFFILIATION_NONE, 254 USER_AFFILIATION_NONE,
255 device_status_provider_.get(), 255 device_status_provider_.get(),
256 device_management_service_, 256 device_management_service_,
257 request_context)); 257 request_context));
258 } 258 }
259 259
260 void DeviceCloudPolicyManagerChromeOS::EnrollmentCompleted( 260 void DeviceCloudPolicyManagerChromeOS::EnrollmentCompleted(
(...skipping 24 matching lines...) Expand all
285 core()->Connect(CreateClient()); 285 core()->Connect(CreateClient());
286 core()->StartRefreshScheduler(); 286 core()->StartRefreshScheduler();
287 core()->TrackRefreshDelayPref(local_state_, 287 core()->TrackRefreshDelayPref(local_state_,
288 prefs::kDevicePolicyRefreshRate); 288 prefs::kDevicePolicyRefreshRate);
289 attestation_policy_observer_.reset( 289 attestation_policy_observer_.reset(
290 new chromeos::attestation::AttestationPolicyObserver(client())); 290 new chromeos::attestation::AttestationPolicyObserver(client()));
291 } 291 }
292 } 292 }
293 293
294 } // namespace policy 294 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698