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

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

Issue 2537643003: Drop verification_key_hash from CloudPolicyClient constructor (Closed)
Patch Set: git cl format Created 4 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/device_local_account_policy_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_initializer.h" 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 enrollment_callback.Run(status); 257 enrollment_callback.Run(status);
258 } 258 }
259 259
260 std::unique_ptr<CloudPolicyClient> DeviceCloudPolicyInitializer::CreateClient( 260 std::unique_ptr<CloudPolicyClient> DeviceCloudPolicyInitializer::CreateClient(
261 DeviceManagementService* device_management_service) { 261 DeviceManagementService* device_management_service) {
262 std::string machine_model; 262 std::string machine_model;
263 statistics_provider_->GetMachineStatistic(chromeos::system::kHardwareClassKey, 263 statistics_provider_->GetMachineStatistic(chromeos::system::kHardwareClassKey,
264 &machine_model); 264 &machine_model);
265 return base::MakeUnique<CloudPolicyClient>( 265 return base::MakeUnique<CloudPolicyClient>(
266 statistics_provider_->GetEnterpriseMachineID(), machine_model, 266 statistics_provider_->GetEnterpriseMachineID(), machine_model,
267 kPolicyVerificationKeyHash, device_management_service, 267 device_management_service, g_browser_process->system_request_context(),
268 g_browser_process->system_request_context(), signing_service_.get()); 268 signing_service_.get());
269 } 269 }
270 270
271 void DeviceCloudPolicyInitializer::TryToCreateClient() { 271 void DeviceCloudPolicyInitializer::TryToCreateClient() {
272 if (!device_store_->is_initialized() || 272 if (!device_store_->is_initialized() ||
273 !device_store_->has_policy() || 273 !device_store_->has_policy() ||
274 state_keys_broker_->pending() || 274 state_keys_broker_->pending() ||
275 enrollment_handler_) { 275 enrollment_handler_) {
276 return; 276 return;
277 } 277 }
278 StartConnection(CreateClient(enterprise_service_)); 278 StartConnection(CreateClient(enterprise_service_));
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 if (success && (success = att_signed_data.ParseFromString(signed_data))) { 328 if (success && (success = att_signed_data.ParseFromString(signed_data))) {
329 em_signed_data.set_data(att_signed_data.data()); 329 em_signed_data.set_data(att_signed_data.data());
330 em_signed_data.set_signature(att_signed_data.signature()); 330 em_signed_data.set_signature(att_signed_data.signature());
331 em_signed_data.set_extra_data_bytes(att_signed_data.data().size() - 331 em_signed_data.set_extra_data_bytes(att_signed_data.data().size() -
332 data.size()); 332 data.size());
333 } 333 }
334 callback.Run(success, em_signed_data); 334 callback.Run(success, em_signed_data);
335 } 335 }
336 336
337 } // namespace policy 337 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/device_local_account_policy_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698