update_engine: add chrome os device requisition to the omaha request
Requisition type is not currently sent to Omaha and is thus unavailable
for AU rules. This adds a requisition attribute to the <app> if the
device has a requisition type. Currently, the types may be one of
remora, shark, or rialto.
TEST=unittest
BUG=b:132014633,b:133324571
Change-Id: I0e53d3a5749da4cbb95ce73cff35191066339009
Reviewed-on: https://chromium-review.googlesource.com/1604218
Commit-Ready: Matthew Ziegelbaum <ziegs@chromium.org>
Tested-by: Matthew Ziegelbaum <ziegs@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
diff --git a/omaha_request_params.h b/omaha_request_params.h
index f3f68f4..7b281da 100644
--- a/omaha_request_params.h
+++ b/omaha_request_params.h
@@ -85,6 +85,7 @@
inline std::string hwid() const { return hwid_; }
inline std::string fw_version() const { return fw_version_; }
inline std::string ec_version() const { return ec_version_; }
+ inline std::string device_requisition() const { return device_requisition_; }
inline void set_app_version(const std::string& version) {
image_props_.version = version;
@@ -265,6 +266,9 @@
void set_is_powerwash_allowed(bool powerwash_allowed) {
mutable_image_props_.is_powerwash_allowed = powerwash_allowed;
}
+ void set_device_requisition(const std::string& requisition) {
+ device_requisition_ = requisition;
+ }
private:
FRIEND_TEST(OmahaRequestParamsTest, ChannelIndexTest);
@@ -334,6 +338,9 @@
std::string hwid_; // Hardware Qualification ID of the client
std::string fw_version_; // Chrome OS Firmware Version.
std::string ec_version_; // Chrome OS EC Version.
+ // TODO(b:133324571) tracks removal of this field once it is no longer
+ // needed in AU requests. Remove by October 1st 2019.
+ std::string device_requisition_; // Chrome OS Requisition type.
bool delta_okay_; // If this client can accept a delta
bool interactive_; // Whether this is a user-initiated update check