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

Side by Side Diff: chrome/browser/chromeos/policy/user_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/user_cloud_policy_manager_chromeos.h" 5 #include "chrome/browser/chromeos/policy/user_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/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 if (system_request_context) { 93 if (system_request_context) {
94 // |system_request_context| can be null for tests. 94 // |system_request_context| can be null for tests.
95 // Use the system request context here instead of a context derived 95 // Use the system request context here instead of a context derived
96 // from the Profile because Connect() is called before the profile is 96 // from the Profile because Connect() is called before the profile is
97 // fully initialized (required so we can perform the initial policy load). 97 // fully initialized (required so we can perform the initial policy load).
98 // TODO(atwilson): Change this to use a UserPolicyRequestContext once 98 // TODO(atwilson): Change this to use a UserPolicyRequestContext once
99 // Connect() is called after profile initialization. http://crbug.com/323591 99 // Connect() is called after profile initialization. http://crbug.com/323591
100 request_context = new SystemPolicyRequestContext( 100 request_context = new SystemPolicyRequestContext(
101 system_request_context, 101 system_request_context,
102 content::GetUserAgent(GURL( 102 content::GetUserAgent(GURL(
103 device_management_service->GetServerURL()))); 103 device_management_service->GetServerUrl())));
104 } 104 }
105 scoped_ptr<CloudPolicyClient> cloud_policy_client( 105 scoped_ptr<CloudPolicyClient> cloud_policy_client(
106 new CloudPolicyClient(std::string(), std::string(), user_affiliation, 106 new CloudPolicyClient(std::string(), std::string(), user_affiliation,
107 NULL, device_management_service, 107 NULL, device_management_service,
108 request_context)); 108 request_context));
109 core()->Connect(cloud_policy_client.Pass()); 109 core()->Connect(cloud_policy_client.Pass());
110 client()->AddObserver(this); 110 client()->AddObserver(this);
111 111
112 external_data_manager_->Connect(request_context); 112 external_data_manager_->Connect(request_context);
113 113
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 // OnComponentCloudPolicyUpdated() once it's ready. 331 // OnComponentCloudPolicyUpdated() once it's ready.
332 return; 332 return;
333 } 333 }
334 334
335 core()->StartRefreshScheduler(); 335 core()->StartRefreshScheduler();
336 core()->TrackRefreshDelayPref(local_state_, 336 core()->TrackRefreshDelayPref(local_state_,
337 policy_prefs::kUserPolicyRefreshRate); 337 policy_prefs::kUserPolicyRefreshRate);
338 } 338 }
339 339
340 } // namespace policy 340 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/policy/device_local_account_policy_service.cc ('k') | chrome/browser/policy/cloud/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698