Replace is_full_update boolean with a payload_state enum. The "is_full_update" flag in the InstallPlan is required to decide whether we should run a FilesystemVerification step before start downloading the payload (for delta payloads) or not (for full payloads). This step is done before start downloading the payload and not after downloading the metadata to avoid long delays in the connection which would then drop and require a retry. Since the not so recent inclusion of the source_data_hash field in the delta operations, the source data is verified on each operation, so the install plan field and the pre-download FilesystemVerification is not needed anymore. To help deprecate this process, which is not included in the non-Brillo version, this patch changes the is_full_update field to a payload_state enum with a third "unknown" state that will be changed to delta or full once the payload metadata is parsed. Bug: 25631949 TEST=unittests updated. TEST=Pushed a delta update to edison-eng and a non-Brillo target. Change-Id: I17d8bf58990d8465bb8487adc66601f1c1dfca6d
diff --git a/common/test_utils.h b/common/test_utils.h index 616bdd3..b5151f2 100644 --- a/common/test_utils.h +++ b/common/test_utils.h
@@ -44,6 +44,7 @@ // PrintTo() functions are used by gtest to log these objects. These PrintTo() // functions must be defined in the same namespace as the first argument. void PrintTo(const Extent& extent, ::std::ostream* os); +void PrintTo(const ErrorCode& error_code, ::std::ostream* os); namespace test_utils {