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/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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // from the Profile because Connect() is called before the profile is | 112 // from the Profile because Connect() is called before the profile is |
113 // fully initialized (required so we can perform the initial policy load). | 113 // fully initialized (required so we can perform the initial policy load). |
114 // TODO(atwilson): Change this to use a UserPolicyRequestContext once | 114 // TODO(atwilson): Change this to use a UserPolicyRequestContext once |
115 // Connect() is called after profile initialization. http://crbug.com/323591 | 115 // Connect() is called after profile initialization. http://crbug.com/323591 |
116 request_context = new SystemPolicyRequestContext( | 116 request_context = new SystemPolicyRequestContext( |
117 system_request_context, | 117 system_request_context, |
118 content::GetUserAgent(GURL( | 118 content::GetUserAgent(GURL( |
119 device_management_service->GetServerUrl()))); | 119 device_management_service->GetServerUrl()))); |
120 } | 120 } |
121 scoped_ptr<CloudPolicyClient> cloud_policy_client( | 121 scoped_ptr<CloudPolicyClient> cloud_policy_client( |
122 new CloudPolicyClient(std::string(), std::string(), user_affiliation, | 122 new CloudPolicyClient(std::string(), std::string(), |
| 123 kPolicyVerificationKeyHash, user_affiliation, |
123 NULL, device_management_service, | 124 NULL, device_management_service, |
124 request_context)); | 125 request_context)); |
125 core()->Connect(cloud_policy_client.Pass()); | 126 core()->Connect(cloud_policy_client.Pass()); |
126 client()->AddObserver(this); | 127 client()->AddObserver(this); |
127 | 128 |
128 external_data_manager_->Connect(request_context); | 129 external_data_manager_->Connect(request_context); |
129 | 130 |
130 CreateComponentCloudPolicyService(component_policy_cache_path_, | 131 CreateComponentCloudPolicyService(component_policy_cache_path_, |
131 request_context); | 132 request_context); |
132 | 133 |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 // OnComponentCloudPolicyUpdated() once it's ready. | 371 // OnComponentCloudPolicyUpdated() once it's ready. |
371 return; | 372 return; |
372 } | 373 } |
373 | 374 |
374 core()->StartRefreshScheduler(); | 375 core()->StartRefreshScheduler(); |
375 core()->TrackRefreshDelayPref(local_state_, | 376 core()->TrackRefreshDelayPref(local_state_, |
376 policy_prefs::kUserPolicyRefreshRate); | 377 policy_prefs::kUserPolicyRefreshRate); |
377 } | 378 } |
378 | 379 |
379 } // namespace policy | 380 } // namespace policy |
OLD | NEW |