AU: Verify that the actual download size matches the size reported by Omaha.
This patch makes sure that the size of the payload received from the server
matches the size reported by Omaha. We could also verify that the HTTP header
size field matches the Omaha size but that seems redundant -- ultimately, it's
important that the number of bytes that AU actually downloads (and calculates
the hash on) matches the Omaha size.
BUG=6579
TEST=unit tests, gmerged on device and tested with a regular as well as a
modified dev server to send incorrect size.
Change-Id: I2f38e2df53e713c0b4f417533028fcb623e2df16
Review URL: http://codereview.chromium.org/3499004
diff --git a/action_processor.h b/action_processor.h
index a395b3d..98fc853 100644
--- a/action_processor.h
+++ b/action_processor.h
@@ -34,6 +34,7 @@
kActionCodeKernelDeviceOpenError = 8,
kActionCodeDownloadTransferError = 9,
kActionCodeDownloadHashMismatchError = 10,
+ kActionCodeDownloadSizeMismatchError = 11,
};
class AbstractAction;