diff options
| author | Alex Deymo <deymo@google.com> | 2016-02-03 09:22:17 -0800 |
|---|---|---|
| committer | Alex Deymo <deymo@google.com> | 2016-02-03 20:52:47 -0800 |
| commit | 1f19dccb115cf608104b1cb0d192a53ae32f238f (patch) | |
| tree | 7f9ba9eab7aafb5d7727852a3ed369e086a3acb5 /metrics_utils.cc | |
| parent | 12542ace0f43c5afaf1e7112556b71aea8454c79 (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 'metrics_utils.cc')
| -rw-r--r-- | metrics_utils.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/metrics_utils.cc b/metrics_utils.cc index eb99c7d4..11260fc6 100644 --- a/metrics_utils.cc +++ b/metrics_utils.cc @@ -85,6 +85,9 @@ metrics::AttemptResult GetAttemptResult(ErrorCode code) { case ErrorCode::kPostinstallFirmwareRONotUpdatable: return metrics::AttemptResult::kPostInstallFailed; + case ErrorCode::kUserCanceled: + return metrics::AttemptResult::kUpdateCanceled; + // We should never get these errors in the update-attempt stage so // return internal error if this happens. case ErrorCode::kError: @@ -201,6 +204,7 @@ metrics::DownloadErrorCode GetDownloadErrorCode(ErrorCode code) { case ErrorCode::kUnsupportedMinorPayloadVersion: case ErrorCode::kOmahaRequestXMLHasEntityDecl: case ErrorCode::kFilesystemVerifierError: + case ErrorCode::kUserCanceled: break; // Special flags. These can't happen (we mask them out above) but |
