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/payload_state.cc b/payload_state.cc
index d7ccee5..38a36f9 100644
--- a/payload_state.cc
+++ b/payload_state.cc
@@ -340,6 +340,7 @@
case ErrorCode::kUpdateCanceledByChannelChange:
case ErrorCode::kOmahaRequestXMLHasEntityDecl:
case ErrorCode::kFilesystemVerifierError:
+ case ErrorCode::kUserCanceled:
LOG(INFO) << "Not incrementing URL index or failure count for this error";
break;
@@ -608,6 +609,7 @@
case metrics::AttemptResult::kVerificationFailed:
case metrics::AttemptResult::kPostInstallFailed:
case metrics::AttemptResult::kAbnormalTermination:
+ case metrics::AttemptResult::kUpdateCanceled:
case metrics::AttemptResult::kNumConstants:
case metrics::AttemptResult::kUnset:
break;