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

Issue 4111006: AU: No need to calculate SHA-256 on the payload twice for delta updates. (Closed)

Created:
10 years, 1 month ago by petkov
Modified:
9 years, 7 months ago
Reviewers:
adlr
CC:
chromium-os-reviews_chromium.org, petkov, adlr, jrbarnette
Visibility:
Public.

Description

AU: No need to calculate SHA-256 on the payload twice for delta updates. BUG=8200 TEST=unit test; tested on device Change-Id: Ie8dcd3984c858ebf398f56c4e1a1dba31c95c700 Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=cdc20a9

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -1 line) Patch
M download_action.cc View 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
petkov
10 years, 1 month ago (2010-10-27 20:49:09 UTC) #1
adlr
10 years, 1 month ago (2010-10-27 21:02:12 UTC) #2
LGTM

On Wed, Oct 27, 2010 at 1:49 PM, <petkov@chromium.org> wrote:

> Reviewers: adlr,
>
> Description:
> AU: No need to calculate SHA-256 on the payload twice for delta updates.
>
> BUG=8200
> TEST=unit test; tested on device
>
> Change-Id: Ie8dcd3984c858ebf398f56c4e1a1dba31c95c700
>
> Please review this at http://codereview.chromium.org/4111006/show
>
> SVN Base: ssh://git@gitrw.chromium.org:9222/update_engine.git
>
> Affected files:
>  M download_action.cc
>
>
> 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 {
>
>
>

Powered by Google App Engine
This is Rietveld 408576698