Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(929)

Unified Diff: install_plan.h

Issue 5516009: AU: Split applied update verification into a separate step. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git@master
Patch Set: review comments Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « generate_delta_main.cc ('k') | update_attempter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: install_plan.h
diff --git a/install_plan.h b/install_plan.h
index 9911d3253bf6efece545291eab017850690c0d12..08472c8b58d611c6bede12aba3bd4c7bdc83ef64 100644
--- a/install_plan.h
+++ b/install_plan.h
@@ -29,7 +29,9 @@ struct InstallPlan {
size(size),
download_hash(hash),
install_path(install_path),
- kernel_install_path(kernel_install_path) {}
+ kernel_install_path(kernel_install_path),
+ kernel_size(0),
+ rootfs_size(0) {}
InstallPlan() : is_full_update(false), is_resume(false), size(0) {}
bool is_full_update;
@@ -39,8 +41,22 @@ struct InstallPlan {
std::string download_hash; // hash of the data at the url
std::string install_path; // path to install device
std::string kernel_install_path; // path to kernel install device
- std::vector<char> current_kernel_hash; // computed by FileSystemCopierAction
- std::vector<char> current_rootfs_hash; // computed by FileSystemCopierAction
+
+ // The fields below are used for kernel and rootfs verification. The flow is:
+ //
+ // 1. FilesystemCopierAction(verify_hash=false) computes and fills in the
+ // source partition sizes and hashes.
+ //
+ // 2. DownloadAction verifies the source partition sizes and hashes against
+ // the expected values transmitted in the update manifest. It fills in the
+ // expected applied partition sizes and hashes based on the manifest.
+ //
+ // 4. FilesystemCopierAction(verify_hashes=true) computes and verifies the
+ // applied partition sizes and hashes against the expected values.
+ uint64_t kernel_size;
+ uint64_t rootfs_size;
+ std::vector<char> kernel_hash;
+ std::vector<char> rootfs_hash;
bool operator==(const InstallPlan& that) const {
return (is_full_update == that.is_full_update) &&
« no previous file with comments | « generate_delta_main.cc ('k') | update_attempter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698