EnrollmentStatus EnrollmentStatus::ForStatus(Status status) {
return EnrollmentStatus(status, DM_STATUS_SUCCESS, net::HTTP_OK,
CloudPolicyStore::STATUS_OK,
- CloudPolicyValidatorBase::VALIDATION_OK);
+ CloudPolicyValidatorBase::VALIDATION_OK,
+ EnterpriseInstallAttributes::LOCK_SUCCESS);
}
// static
DeviceManagementStatus client_status) {
return EnrollmentStatus(STATUS_REGISTRATION_FAILED, client_status,
net::HTTP_OK, CloudPolicyStore::STATUS_OK,
- CloudPolicyValidatorBase::VALIDATION_OK);
+ CloudPolicyValidatorBase::VALIDATION_OK,
+ EnterpriseInstallAttributes::LOCK_SUCCESS);
}
// static
DeviceManagementStatus client_status) {
return EnrollmentStatus(STATUS_ROBOT_AUTH_FETCH_FAILED, client_status,
net::HTTP_OK, CloudPolicyStore::STATUS_OK,
- CloudPolicyValidatorBase::VALIDATION_OK);
+ CloudPolicyValidatorBase::VALIDATION_OK,
+ EnterpriseInstallAttributes::LOCK_SUCCESS);
}
// static
EnrollmentStatus EnrollmentStatus::ForRobotRefreshFetchError(int http_status) {
return EnrollmentStatus(STATUS_ROBOT_REFRESH_FETCH_FAILED, DM_STATUS_SUCCESS,
http_status, CloudPolicyStore::STATUS_OK,
- CloudPolicyValidatorBase::VALIDATION_OK);
+ CloudPolicyValidatorBase::VALIDATION_OK,
+ EnterpriseInstallAttributes::LOCK_SUCCESS);
}
// static
DeviceManagementStatus client_status) {
return EnrollmentStatus(STATUS_POLICY_FETCH_FAILED, client_status,
net::HTTP_OK, CloudPolicyStore::STATUS_OK,
- CloudPolicyValidatorBase::VALIDATION_OK);
+ CloudPolicyValidatorBase::VALIDATION_OK,
+ EnterpriseInstallAttributes::LOCK_SUCCESS);
}
// static
CloudPolicyValidatorBase::Status validation_status) {
return EnrollmentStatus(STATUS_VALIDATION_FAILED, DM_STATUS_SUCCESS,
net::HTTP_OK, CloudPolicyStore::STATUS_OK,
- validation_status);
+ validation_status,
+ EnterpriseInstallAttributes::LOCK_SUCCESS);
}
// static
CloudPolicyStore::Status store_error,
CloudPolicyValidatorBase::Status validation_status) {
return EnrollmentStatus(STATUS_STORE_ERROR, DM_STATUS_SUCCESS,
- net::HTTP_OK, store_error, validation_status);
+ net::HTTP_OK, store_error, validation_status,
+ EnterpriseInstallAttributes::LOCK_SUCCESS);
+}
+
+// static
+EnrollmentStatus EnrollmentStatus::ForLockError(
+ EnterpriseInstallAttributes::LockResult lock_status) {
+ return EnrollmentStatus(STATUS_LOCK_ERROR, DM_STATUS_SUCCESS,
+ net::HTTP_OK, CloudPolicyStore::STATUS_OK,
+ CloudPolicyValidatorBase::VALIDATION_OK,
+ lock_status);
}
EnrollmentStatus::EnrollmentStatus(
DeviceManagementStatus client_status,
int http_status,
CloudPolicyStore::Status store_status,
- CloudPolicyValidatorBase::Status validation_status)
+ CloudPolicyValidatorBase::Status validation_status,
+ EnterpriseInstallAttributes::LockResult lock_status)
: status_(status),
client_status_(client_status),
http_status_(http_status),
store_status_(store_status),
- validation_status_(validation_status) {}
+ validation_status_(validation_status),
+ lock_status_(lock_status) {}
} // namespace policy