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

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

Issue 2261763002: Device enterprise registration with a certificate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initialize pointers to nullptr. Created 4 years, 4 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
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 <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 scoped_refptr<net::URLRequestContextGetter> system_request_context) { 126 scoped_refptr<net::URLRequestContextGetter> system_request_context) {
127 DCHECK(device_management_service); 127 DCHECK(device_management_service);
128 DCHECK(local_state); 128 DCHECK(local_state);
129 local_state_ = local_state; 129 local_state_ = local_state;
130 // Note: |system_request_context| can be null for tests. 130 // Note: |system_request_context| can be null for tests.
131 // Use the system request context here instead of a context derived 131 // Use the system request context here instead of a context derived
132 // from the Profile because Connect() is called before the profile is 132 // from the Profile because Connect() is called before the profile is
133 // fully initialized (required so we can perform the initial policy load). 133 // fully initialized (required so we can perform the initial policy load).
134 std::unique_ptr<CloudPolicyClient> cloud_policy_client(new CloudPolicyClient( 134 std::unique_ptr<CloudPolicyClient> cloud_policy_client(new CloudPolicyClient(
135 std::string(), std::string(), kPolicyVerificationKeyHash, 135 std::string(), std::string(), kPolicyVerificationKeyHash,
136 device_management_service, system_request_context)); 136 device_management_service, system_request_context,
137 nullptr /* signing_service */));
137 CreateComponentCloudPolicyService(component_policy_cache_path_, 138 CreateComponentCloudPolicyService(component_policy_cache_path_,
138 system_request_context, 139 system_request_context,
139 cloud_policy_client.get()); 140 cloud_policy_client.get());
140 core()->Connect(std::move(cloud_policy_client)); 141 core()->Connect(std::move(cloud_policy_client));
141 client()->AddObserver(this); 142 client()->AddObserver(this);
142 143
143 external_data_manager_->Connect(system_request_context); 144 external_data_manager_->Connect(system_request_context);
144 145
145 // Determine the next step after the CloudPolicyService initializes. 146 // Determine the next step after the CloudPolicyService initializes.
146 if (service()->IsInitializationComplete()) { 147 if (service()->IsInitializationComplete()) {
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 // OnComponentCloudPolicyUpdated() once it's ready. 449 // OnComponentCloudPolicyUpdated() once it's ready.
449 return; 450 return;
450 } 451 }
451 452
452 core()->StartRefreshScheduler(); 453 core()->StartRefreshScheduler();
453 core()->TrackRefreshDelayPref(local_state_, 454 core()->TrackRefreshDelayPref(local_state_,
454 policy_prefs::kUserPolicyRefreshRate); 455 policy_prefs::kUserPolicyRefreshRate);
455 } 456 }
456 457
457 } // namespace policy 458 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/policy/device_local_account_policy_service.cc ('k') | chromeos/attestation/attestation_flow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698