Enforce handling of expected payload versions only.
We have always shipped version 1 payloads, but have never checked the
version number. This change enforces that, so we refuse to process
any other version number.
The new error code kErrorCodeUnsupportedPayloadVersion is added to
report bad payload versions if they are received.
BUG=chromium:312526
TEST=Unittests.
Change-Id: I25c9f7e73c37274527bc7cc9ba9e3d9f4734326c
Reviewed-on: https://chromium-review.googlesource.com/174940
Commit-Queue: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
diff --git a/payload_state_unittest.cc b/payload_state_unittest.cc
index ab59331..ec79950 100644
--- a/payload_state_unittest.cc
+++ b/payload_state_unittest.cc
@@ -90,7 +90,7 @@
class PayloadStateTest : public ::testing::Test { };
TEST(PayloadStateTest, DidYouAddANewErrorCode) {
- if (kErrorCodeUmaReportedMax != 44) {
+ if (kErrorCodeUmaReportedMax != 46) {
LOG(ERROR) << "The following failure is intentional. If you added a new "
<< "ErrorCode enum value, make sure to add it to the "
<< "PayloadState::UpdateFailed method and then update this test "