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

Unified Diff: chrome/installer/setup/setup_main.cc

Issue 893703004: Rewriting patch logic without the comma operator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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: chrome/installer/setup/setup_main.cc
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc
index 2372e9d301fa09771fd71860afdbbf733972d976..ad76e114f721b2ce9e767820aa18ad1034bdc406 100644
--- a/chrome/installer/setup/setup_main.cc
+++ b/chrome/installer/setup/setup_main.cc
@@ -170,15 +170,16 @@ bool UncompressAndPatchChromeArchive(
archive_helper->set_patch_source(patch_source);
// Try courgette first. Failing that, try bspatch.
- if ((installer_state.UpdateStage(installer::ENSEMBLE_PATCHING),
- !archive_helper->EnsemblePatch()) &&
- (installer_state.UpdateStage(installer::BINARY_PATCHING),
- !archive_helper->BinaryPatch())) {
- *install_status = installer::APPLY_DIFF_PATCH_FAILED;
- installer_state.WriteInstallerResult(*install_status,
+ installer_state.UpdateStage(installer::ENSEMBLE_PATCHING);
+ if (!archive_helper->EnsemblePatch()) {
+ installer_state.UpdateStage(installer::BINARY_PATCHING);
+ if (!archive_helper->BinaryPatch()) {
+ *install_status = installer::APPLY_DIFF_PATCH_FAILED;
+ installer_state.WriteInstallerResult(*install_status,
IDS_INSTALL_UNCOMPRESSION_FAILED_BASE,
grt (UTC plus 2) 2015/02/03 18:49:08 the indentation here should be something more like
brucedawson 2015/02/03 19:02:22 I was wondering how to best do that. Aligning all
NULL);
- return false;
+ return false;
+ }
}
*archive_type = installer::INCREMENTAL_ARCHIVE_TYPE;
« 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