Commit 459a18f9 authored by Trent Begin's avatar Trent Begin Committed by Commit Bot

diagnostics_service: add default case for DiagnosticRoutineEnum

This default case ensures that CrosHealthd can add additional routines
without modifying the DiagnosticsService. Routines will have to be
explicitly added to the conversion list if they want to be used.

Bug: b:158658869
Change-Id: I9a12db071e59b71e12bb6ce91a6b116c1d9ed52c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363315
Commit-Queue: Trent Begin <tbegin@chromium.org>
Auto-Submit: Trent Begin <tbegin@chromium.org>
Reviewed-by: default avatarPaul Moy <pmoy@chromium.org>
Reviewed-by: default avatarOleh Lamzin <lamzin@google.com>
Reviewed-by: default avatarMahmoud Gawad <mgawad@google.com>
Cr-Commit-Position: refs/heads/master@{#799684}
parent 3c6fb0c0
......@@ -122,9 +122,9 @@ base::Optional<health::mojom::DiagnosticRoutineEnum> Convert(
return health::mojom::DiagnosticRoutineEnum::kPrimeSearch;
case cros_healthd::mojom::DiagnosticRoutineEnum::kBatteryDischarge:
return health::mojom::DiagnosticRoutineEnum::kBatteryDischarge;
default:
return base::nullopt;
}
NOTREACHED();
return base::nullopt;
}
std::string Convert(mojo::ScopedHandle handle) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment