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

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

Issue 2528923002: Revert of Remove requisition parameter for Chromad. (Closed)
Patch Set: 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 | no next file » | 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 void DeviceCloudPolicyInitializer::StartEnrollment( 95 void DeviceCloudPolicyInitializer::StartEnrollment(
96 DeviceManagementService* device_management_service, 96 DeviceManagementService* device_management_service,
97 const EnrollmentConfig& enrollment_config, 97 const EnrollmentConfig& enrollment_config,
98 const std::string& auth_token, 98 const std::string& auth_token,
99 const EnrollmentCallback& enrollment_callback) { 99 const EnrollmentCallback& enrollment_callback) {
100 DCHECK(is_initialized_); 100 DCHECK(is_initialized_);
101 DCHECK(!enrollment_handler_); 101 DCHECK(!enrollment_handler_);
102 102
103 manager_->core()->Disconnect(); 103 manager_->core()->Disconnect();
104 // TODO(rsorokin): make proper SetDeviceRequisition
105 if (!enrollment_config.management_realm.empty())
106 manager_->SetDeviceRequisition("chrome_ad");
104 107
105 enrollment_handler_.reset(new EnrollmentHandlerChromeOS( 108 enrollment_handler_.reset(new EnrollmentHandlerChromeOS(
106 device_store_, install_attributes_, state_keys_broker_, 109 device_store_, install_attributes_, state_keys_broker_,
107 attestation_flow_.get(), CreateClient(device_management_service), 110 attestation_flow_.get(), CreateClient(device_management_service),
108 background_task_runner_, enrollment_config, auth_token, 111 background_task_runner_, enrollment_config, auth_token,
109 install_attributes_->GetDeviceId(), manager_->GetDeviceRequisition(), 112 install_attributes_->GetDeviceId(), manager_->GetDeviceRequisition(),
110 base::Bind(&DeviceCloudPolicyInitializer::EnrollmentCompleted, 113 base::Bind(&DeviceCloudPolicyInitializer::EnrollmentCompleted,
111 base::Unretained(this), enrollment_callback))); 114 base::Unretained(this), enrollment_callback)));
112 enrollment_handler_->StartEnrollment(); 115 enrollment_handler_->StartEnrollment();
113 } 116 }
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 if (success && (success = att_signed_data.ParseFromString(signed_data))) { 327 if (success && (success = att_signed_data.ParseFromString(signed_data))) {
325 em_signed_data.set_data(att_signed_data.data()); 328 em_signed_data.set_data(att_signed_data.data());
326 em_signed_data.set_signature(att_signed_data.signature()); 329 em_signed_data.set_signature(att_signed_data.signature());
327 em_signed_data.set_extra_data_bytes(att_signed_data.data().size() - 330 em_signed_data.set_extra_data_bytes(att_signed_data.data().size() -
328 data.size()); 331 data.size());
329 } 332 }
330 callback.Run(success, em_signed_data); 333 callback.Run(success, em_signed_data);
331 } 334 }
332 335
333 } // namespace policy 336 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698