update_engine: Move InstallOperation to the top level.
The InstallOperation message in the protobuf is a nested message
inside the DeltaArchiveManifest message, making all references to
operation types be very long names like
DeltaArchiveManifest_InstallOperation_Type_REPLACE_BZ while most other
messages are not nested in the DeltaArchiveManifest message.
To improve readability and to prepare for future update metadata
changes, this patch moves the InstallOperation message to the top level
and replaces all references to operation types with the new shorter
version like InstallOperation::REPLACE_BZ.
This change only impacts the scope of the generated classes and the
serialized format of the protobuf. This exact same question was
addressed by protobuf maintainers here:
https://groups.google.com/forum/#!topic/protobuf/azWAPa6hP4A
Finally coding style and indentation was automatically updated due to
the shorter names.
BUG=b:23179128
TEST=Unittest still pass.
Change-Id: I55add54265934cd1fd3e9cb786c5d3f784902d17
Reviewed-on: https://chromium-review.googlesource.com/293504
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/payload_generator/payload_file.h b/payload_generator/payload_file.h
index 150b0b0..a8f815b 100644
--- a/payload_generator/payload_file.h
+++ b/payload_generator/payload_file.h
@@ -50,8 +50,7 @@
// dummy operation for signature blob because the contents of the signature
// blob will not be available at payload creation time. So, update_engine will
// gracefully ignore the dummy signature operation.
- static bool AddOperationHash(DeltaArchiveManifest_InstallOperation* op,
- const chromeos::Blob& buf);
+ static bool AddOperationHash(InstallOperation* op, const chromeos::Blob& buf);
// Install operations in the manifest may reference data blobs, which
// are in data_blobs_path. This function creates a new data blobs file