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

Unified Diff: download_action.cc

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 | « delta_performer_unittest.cc ('k') | filesystem_copier_action.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: download_action.cc
diff --git a/download_action.cc b/download_action.cc
index d06fb790c44596df512403af6849296a796ca80c..d6ae97dfefc5eec167fab74d725b7aba6ae85d33 100644
--- a/download_action.cc
+++ b/download_action.cc
@@ -65,10 +65,8 @@ void DownloadAction::PerformAction() {
writer_ = decompressing_file_writer_.get();
} else {
delta_performer_.reset(new DeltaPerformer(prefs_));
- delta_performer_->set_current_kernel_hash(
- &install_plan_.current_kernel_hash);
- delta_performer_->set_current_rootfs_hash(
- &install_plan_.current_rootfs_hash);
+ delta_performer_->set_current_kernel_hash(install_plan_.kernel_hash);
+ delta_performer_->set_current_rootfs_hash(install_plan_.rootfs_hash);
writer_ = delta_performer_.get();
}
}
@@ -169,11 +167,13 @@ void DownloadAction::TransferComplete(HttpFetcher *fetcher, bool successful) {
LOG(ERROR) << "Download of " << install_plan_.download_url
<< " failed due to payload verification error.";
code = kActionCodeDownloadPayloadVerificationError;
- } else if (!delta_performer_->VerifyAppliedUpdate(
- install_plan_.install_path, install_plan_.kernel_install_path)) {
- LOG(ERROR) << "Download of " << install_plan_.download_url
- << " failed due to applied update verification error.";
- code = kActionCodeDownloadAppliedUpdateVerificationError;
+ } else if (!delta_performer_->GetNewPartitionInfo(
+ &install_plan_.kernel_size,
+ &install_plan_.kernel_hash,
+ &install_plan_.rootfs_size,
+ &install_plan_.rootfs_hash)) {
+ LOG(ERROR) << "Unable to get new partition hash info.";
+ code = kActionCodeDownloadNewPartitionInfoError;
}
} else {
// Makes sure the hash and size are correct for an old-style full update.
@@ -196,7 +196,7 @@ void DownloadAction::TransferComplete(HttpFetcher *fetcher, bool successful) {
// Write the path to the output pipe if we're successful.
if (code == kActionCodeSuccess && HasOutputPipe())
- SetOutputObject(GetInputObject());
+ SetOutputObject(install_plan_);
processor_->ActionComplete(this, code);
}
« no previous file with comments | « delta_performer_unittest.cc ('k') | filesystem_copier_action.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698