update_engine: Add rollback_allowed policy in Omaha requests
Send rollback_allowed="true" parameter to Omaha if rollback is
allowed through enterprise policy.
This parameter indicates to Omaha that the returned image might
be a rollback image, if the targetversionprefix parameter is set
and it is an earlier version than the one which is currently on
the device.
Also, this CL changes update_engine behavior to only send
targetversionprefix to Omaha if it's not empty.
BUG=chromium:814830
TEST='cros_run_unit_tests --board=cyan --packages update_engine'
Change-Id: Iaa5503e217631311fb9ba3a5237ccbfedf04afe9
Reviewed-on: https://chromium-review.googlesource.com/932123
Commit-Ready: Marton Hunyady <hunyadym@chromium.org>
Tested-by: Marton Hunyady <hunyadym@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
13 files changed