Return the error reason to the caller of SetTargetChannel.
This patch sends back to the caller an error message indicating why the
channel change didn't work.
Bug: 25595865
Test: Deployed on a device and attempted to change to "foo" channel. Error message lists available channels.
Test: FEATURES=test emerge-link update_engine
Change-Id: Idcc67d5c7878ce7af60652d7bf5bf81135325f97
diff --git a/omaha_request_params.h b/omaha_request_params.h
index b6b6f04..90cbc6e 100644
--- a/omaha_request_params.h
+++ b/omaha_request_params.h
@@ -206,7 +206,8 @@
// numerous edge cases around ensuring the powerwash happens as intended in
// all such cases.
virtual bool SetTargetChannel(const std::string& channel,
- bool is_powerwash_allowed);
+ bool is_powerwash_allowed,
+ std::string* error_message);
// Updates the download channel for this particular attempt from the current
// value of target channel. This method takes a "snapshot" of the current