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

Unified Diff: components/policy/core/common/cloud/cloud_policy_client.cc

Issue 2977033002: Mixed Licenses Enrollment (Closed)
Patch Set: Fix last nit Created 3 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 side-by-side diff with in-line comments
Download patch
Index: components/policy/core/common/cloud/cloud_policy_client.cc
diff --git a/components/policy/core/common/cloud/cloud_policy_client.cc b/components/policy/core/common/cloud/cloud_policy_client.cc
index cb2741018ac7aa15d036065e6578616af8ec9616..35873a89958a165feb531f562252a738bfefdc63 100644
--- a/components/policy/core/common/cloud/cloud_policy_client.cc
+++ b/components/policy/core/common/cloud/cloud_policy_client.cc
@@ -131,6 +131,7 @@ void CloudPolicyClient::SetClientId(const std::string& client_id) {
void CloudPolicyClient::Register(em::DeviceRegisterRequest::Type type,
em::DeviceRegisterRequest::Flavor flavor,
+ em::LicenseType::LicenseTypeEnum license_type,
const std::string& auth_token,
const std::string& client_id,
const std::string& requisition,
@@ -161,6 +162,8 @@ void CloudPolicyClient::Register(em::DeviceRegisterRequest::Type type,
if (!current_state_key.empty())
request->set_server_backed_state_key(current_state_key);
request->set_flavor(flavor);
+ if (license_type != em::LicenseType::UNDEFINED)
+ request->mutable_license_type()->set_license_type(license_type);
policy_fetch_request_job_->SetRetryCallback(
base::Bind(&CloudPolicyClient::OnRetryRegister,
@@ -174,6 +177,7 @@ void CloudPolicyClient::Register(em::DeviceRegisterRequest::Type type,
void CloudPolicyClient::RegisterWithCertificate(
em::DeviceRegisterRequest::Type type,
em::DeviceRegisterRequest::Flavor flavor,
+ em::LicenseType::LicenseTypeEnum license_type,
const std::string& pem_certificate_chain,
const std::string& client_id,
const std::string& requisition,
@@ -202,6 +206,8 @@ void CloudPolicyClient::RegisterWithCertificate(
if (!current_state_key.empty())
request->set_server_backed_state_key(current_state_key);
request->set_flavor(flavor);
+ if (license_type != em::LicenseType::UNDEFINED)
+ request->mutable_license_type()->set_license_type(license_type);
signing_service_->SignData(data.SerializeAsString(),
base::Bind(&CloudPolicyClient::OnRegisterWithCertificateRequestSigned,

Powered by Google App Engine
This is Rietveld 408576698