Add ErrorCode::kUserCanceled.
To accomodate the posibility of canceling an ongoing update, this patch
adds a new ErrorCode signaling a user canceling the update.
This patch also removes the now useless unittests that checks if you
added a new error code since the compiler fails if you don't add the
error code to the method mentioned in the test.
Bug: None
TEST=FEATURES=test emerge-link update_engine
TEST=`mmma system/update_engine` on edison-eng and aosp_arm-eng
Change-Id: I991dab1dd8b6c0bb0c24d51cca4e1b75440a86b4
diff --git a/common/error_code.h b/common/error_code.h
index 2bbdcfa..32155f2 100644
--- a/common/error_code.h
+++ b/common/error_code.h
@@ -71,6 +71,7 @@
kUnsupportedMinorPayloadVersion = 45,
kOmahaRequestXMLHasEntityDecl = 46,
kFilesystemVerifierError = 47,
+ kUserCanceled = 48,
// VERY IMPORTANT! When adding new error codes:
//
@@ -122,8 +123,8 @@
// Mask that indicates bit positions that are used to indicate special flags
// that are embedded in the error code to provide additional context about
// the system in which the error was encountered.
- kSpecialFlags = (kDevModeFlag | kResumedFlag | kTestImageFlag |
- kTestOmahaUrlFlag)
+ kSpecialFlags =
+ (kDevModeFlag | kResumedFlag | kTestImageFlag | kTestOmahaUrlFlag)
};
inline std::ostream& operator<<(std::ostream& os, ErrorCode val) {