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

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: Fixing indentation as per code-review. 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..5454e8d1d531482ca7612fdbd28717d2e86a5e7e 100644
--- a/chrome/installer/setup/setup_main.cc
+++ b/chrome/installer/setup/setup_main.cc
@@ -170,15 +170,15 @@ 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,
- IDS_INSTALL_UNCOMPRESSION_FAILED_BASE,
- NULL);
- return false;
+ 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, NULL);
+ 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