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

Unified Diff: download_action.cc

Issue 4111006: AU: No need to calculate SHA-256 on the payload twice for delta updates. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: Created 10 years, 2 months 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 | « no previous file | no next file » | 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 bb5d18938c7d302a0c062455ab40a9b0fd3d8102..c17d7e26f7af1a17c5b440477e7ae79788e0ff67 100644
--- a/download_action.cc
+++ b/download_action.cc
@@ -123,7 +123,10 @@ void DownloadAction::ReceivedBytes(HttpFetcher *fetcher,
processor_->ActionComplete(this, kActionCodeDownloadWriteError);
return;
}
- omaha_hash_calculator_.Update(bytes, length);
+ // DeltaPerformer checks the hashes for delta updates.
+ if (install_plan_.is_full_update) {
+ omaha_hash_calculator_.Update(bytes, length);
+ }
}
namespace {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698