AU: move 'userinitiated' flag to the right place in an update check
The said flag, introduced in a recent change, should be an attribute of
the <updatecheck> node, now fixed. Also changed a couple of unit tests
to reflect this.
BUG=chromium-os:26594
TEST=Flag now appears in the right place
Change-Id: I4f024797da34376364d358631d1a606be8be639e
Reviewed-on: https://gerrit.chromium.org/gerrit/41628
Commit-Queue: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
diff --git a/omaha_request_action.cc b/omaha_request_action.cc
index c1eb795..2943ad8 100644
--- a/omaha_request_action.cc
+++ b/omaha_request_action.cc
@@ -128,8 +128,10 @@
body += StringPrintf(
" <updatecheck"
" targetversionprefix=\"%s\""
+ " userinitiated=\"%s\""
"></updatecheck>\n",
- XmlEncode(params.target_version_prefix).c_str());
+ XmlEncode(params.target_version_prefix).c_str(),
+ (params.interactive ? "true" : "false"));
// If this is the first update check after a reboot following a previous
// update, generate an event containing the previous version number. If
@@ -178,9 +180,7 @@
XmlEncode(params.app_track) + "\" board=\"" +
XmlEncode(params.os_board) + "\" hardware_class=\"" +
XmlEncode(params.hardware_class) + "\" delta_okay=\"" +
- (params.delta_okay ? "true" : "false") +
- "\" userinitiated=\"" + (params.interactive ? "true" : "false") +
- "\">\n" + body +
+ (params.delta_okay ? "true" : "false") + "\">\n" + body +
" </app>\n"
"</request>\n";
}