Update engine should use the release channel policy if it exists.
The release channel (aka update track) can be specified by a device
policy. When this is the case, the update engine should use the
value specified by the policy instead of the value specified in
/etc/lsb-release.
BUG=chromium-os:17015
TEST=Added two new tests:
- Added test that OmahaRequestParams uses the release channel passed
in to it when the value is valid, and otherwise uses /etc/lsb-release.
- Added test that the update engine correctly picks up the release
channel that's specified by the policy.
Change-Id: I2fe03712220bb3286476b12cd1f1b330ad006d7c
Reviewed-on: http://gerrit.chromium.org/gerrit/5072
Tested-by: Patrick Dubroy <dubroy@chromium.org>
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
diff --git a/omaha_request_params.h b/omaha_request_params.h
index edaba67..da091c0 100644
--- a/omaha_request_params.h
+++ b/omaha_request_params.h
@@ -73,7 +73,8 @@
// |in_app_version| or |in_update_url| prevents automatic detection
// of the parameter. Returns true on success, false otherwise.
bool Init(const std::string& in_app_version,
- const std::string& in_update_url);
+ const std::string& in_update_url,
+ const std::string& in_release_track);
// Permanently changes the release track to |track|. Returns true on success,
// false otherwise.