Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(575)

Unified Diff: omaha_request_action.cc

Issue 6098008: AU: Include a bit flag (bit 31) in error codes to indicate non-normal boot mode. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git@master
Patch Set: review Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « action_processor.h ('k') | omaha_request_action_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: omaha_request_action.cc
diff --git a/omaha_request_action.cc b/omaha_request_action.cc
index bb2275d2f78e58389702854bb1348b7ebd18e888..b8495c8195a743f6cffea50ed7b8d45f73eaff3c 100644
--- a/omaha_request_action.cc
+++ b/omaha_request_action.cc
@@ -119,11 +119,15 @@ string FormatRequest(const OmahaEvent* event,
<< "Unable to reset the previous version.";
}
} else {
- // The error code is an optional attribute so append it only if
- // the result is not success.
+ // The error code is an optional attribute so append it only if the result
+ // is not success.
string error_code;
if (event->result != OmahaEvent::kResultSuccess) {
- error_code = StringPrintf(" errorcode=\"%d\"", event->error_code);
+ int code = event->error_code;
+ if (!utils::IsNormalBootMode()) {
+ code |= kActionCodeBootModeFlag;
+ }
+ error_code = StringPrintf(" errorcode=\"%d\"", code);
}
body = StringPrintf(
" <o:event eventtype=\"%d\" eventresult=\"%d\"%s></o:event>\n",
« no previous file with comments | « action_processor.h ('k') | omaha_request_action_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698