Send Omaha event_type 54 after reboot to new update.
When rebooting to a new version, we were sending an Omaha event_type 3
to flag a "success reboot". Nevertheless, the server expect us to send
only one event_type 3 for every <updatecheck> response with a payload
but we were sending one event_type 3 upon payload application and
another one after reboot.
This patch changes the event_type sent after reboot to 54, a value
reserved from Chromium OS clients.
Bug: None
Test: Added unittest.
Change-Id: I199a2b00c702175762f2c154ca2f45b3f6ad768c
diff --git a/omaha_request_action.cc b/omaha_request_action.cc
index 8f405e8..cc762c8 100644
--- a/omaha_request_action.cc
+++ b/omaha_request_action.cc
@@ -136,8 +136,8 @@
app_body += base::StringPrintf(
" <event eventtype=\"%d\" eventresult=\"%d\" "
"previousversion=\"%s\"></event>\n",
- OmahaEvent::kTypeUpdateComplete,
- OmahaEvent::kResultSuccessReboot,
+ OmahaEvent::kTypeRebootedAfterUpdate,
+ OmahaEvent::kResultSuccess,
XmlEncodeWithDefault(prev_version, "0.0.0.0").c_str());
LOG_IF(WARNING, !prefs->SetString(kPrefsPreviousVersion, ""))
<< "Unable to reset the previous version.";