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

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

Issue 2476243002: Remove requisition parameter for Chromad. (Closed)
Patch Set: Created 4 years, 1 month 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");
107 104
108 enrollment_handler_.reset(new EnrollmentHandlerChromeOS( 105 enrollment_handler_.reset(new EnrollmentHandlerChromeOS(
109 device_store_, install_attributes_, state_keys_broker_, 106 device_store_, install_attributes_, state_keys_broker_,
110 attestation_flow_.get(), CreateClient(device_management_service), 107 attestation_flow_.get(), CreateClient(device_management_service),
111 background_task_runner_, enrollment_config, auth_token, 108 background_task_runner_, enrollment_config, auth_token,
112 install_attributes_->GetDeviceId(), manager_->GetDeviceRequisition(), 109 install_attributes_->GetDeviceId(), manager_->GetDeviceRequisition(),
113 base::Bind(&DeviceCloudPolicyInitializer::EnrollmentCompleted, 110 base::Bind(&DeviceCloudPolicyInitializer::EnrollmentCompleted,
114 base::Unretained(this), enrollment_callback))); 111 base::Unretained(this), enrollment_callback)));
115 enrollment_handler_->StartEnrollment(); 112 enrollment_handler_->StartEnrollment();
116 } 113 }
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 if (success && (success = att_signed_data.ParseFromString(signed_data))) { 324 if (success && (success = att_signed_data.ParseFromString(signed_data))) {
328 em_signed_data.set_data(att_signed_data.data()); 325 em_signed_data.set_data(att_signed_data.data());
329 em_signed_data.set_signature(att_signed_data.signature()); 326 em_signed_data.set_signature(att_signed_data.signature());
330 em_signed_data.set_extra_data_bytes(att_signed_data.data().size() - 327 em_signed_data.set_extra_data_bytes(att_signed_data.data().size() -
331 data.size()); 328 data.size());
332 } 329 }
333 callback.Run(success, em_signed_data); 330 callback.Run(success, em_signed_data);
334 } 331 }
335 332
336 } // namespace policy 333 } // 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