Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/installer/setup/setup_main.h" | 5 #include "chrome/installer/setup/setup_main.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <msi.h> | 8 #include <msi.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #include <shlobj.h> | 10 #include <shlobj.h> |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 163 LOG(ERROR) << "Failed to find archive to patch."; | 163 LOG(ERROR) << "Failed to find archive to patch."; |
| 164 *install_status = installer::DIFF_PATCH_SOURCE_MISSING; | 164 *install_status = installer::DIFF_PATCH_SOURCE_MISSING; |
| 165 installer_state.WriteInstallerResult(*install_status, | 165 installer_state.WriteInstallerResult(*install_status, |
| 166 IDS_INSTALL_UNCOMPRESSION_FAILED_BASE, | 166 IDS_INSTALL_UNCOMPRESSION_FAILED_BASE, |
| 167 NULL); | 167 NULL); |
| 168 return false; | 168 return false; |
| 169 } | 169 } |
| 170 archive_helper->set_patch_source(patch_source); | 170 archive_helper->set_patch_source(patch_source); |
| 171 | 171 |
| 172 // Try courgette first. Failing that, try bspatch. | 172 // Try courgette first. Failing that, try bspatch. |
| 173 if ((installer_state.UpdateStage(installer::ENSEMBLE_PATCHING), | 173 installer_state.UpdateStage(installer::ENSEMBLE_PATCHING); |
| 174 !archive_helper->EnsemblePatch()) && | 174 if (!archive_helper->EnsemblePatch()) { |
| 175 (installer_state.UpdateStage(installer::BINARY_PATCHING), | 175 installer_state.UpdateStage(installer::BINARY_PATCHING); |
| 176 !archive_helper->BinaryPatch())) { | 176 if (!archive_helper->BinaryPatch()) { |
| 177 *install_status = installer::APPLY_DIFF_PATCH_FAILED; | 177 *install_status = installer::APPLY_DIFF_PATCH_FAILED; |
| 178 installer_state.WriteInstallerResult(*install_status, | 178 installer_state.WriteInstallerResult(*install_status, |
| 179 IDS_INSTALL_UNCOMPRESSION_FAILED_BASE, | 179 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
| |
| 180 NULL); | 180 NULL); |
| 181 return false; | 181 return false; |
| 182 } | |
| 182 } | 183 } |
| 183 | 184 |
| 184 *archive_type = installer::INCREMENTAL_ARCHIVE_TYPE; | 185 *archive_type = installer::INCREMENTAL_ARCHIVE_TYPE; |
| 185 return true; | 186 return true; |
| 186 } | 187 } |
| 187 | 188 |
| 188 // In multi-install, adds all products to |installer_state| that are | 189 // In multi-install, adds all products to |installer_state| that are |
| 189 // multi-installed and must be updated along with the products already present | 190 // multi-installed and must be updated along with the products already present |
| 190 // in |installer_state|. | 191 // in |installer_state|. |
| 191 void AddExistingMultiInstalls(const InstallationState& original_state, | 192 void AddExistingMultiInstalls(const InstallationState& original_state, |
| (...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1690 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT | 1691 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT |
| 1691 // to pass through, since this is only returned on uninstall which is | 1692 // to pass through, since this is only returned on uninstall which is |
| 1692 // never invoked directly by Google Update. | 1693 // never invoked directly by Google Update. |
| 1693 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1694 return_code = InstallUtil::GetInstallReturnCode(install_status); |
| 1694 } | 1695 } |
| 1695 | 1696 |
| 1696 VLOG(1) << "Installation complete, returning: " << return_code; | 1697 VLOG(1) << "Installation complete, returning: " << return_code; |
| 1697 | 1698 |
| 1698 return return_code; | 1699 return return_code; |
| 1699 } | 1700 } |
| OLD | NEW |