summaryrefslogtreecommitdiff
path: root/payload_state.cc
diff options
context:
space:
mode:
authorAlex Deymo <deymo@google.com>2016-02-03 09:22:17 -0800
committerAlex Deymo <deymo@google.com>2016-02-03 20:52:47 -0800
commit1f19dccb115cf608104b1cb0d192a53ae32f238f (patch)
tree7f9ba9eab7aafb5d7727852a3ed369e086a3acb5 /payload_state.cc
parent12542ace0f43c5afaf1e7112556b71aea8454c79 (diff)
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
Diffstat (limited to 'payload_state.cc')
-rw-r--r--payload_state.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/payload_state.cc b/payload_state.cc
index d7ccee5e..38a36f94 100644
--- a/payload_state.cc
+++ b/payload_state.cc
@@ -340,6 +340,7 @@ void PayloadState::UpdateFailed(ErrorCode error) {
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 @@ void PayloadState::CollectAndReportAttemptMetrics(ErrorCode code) {
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;