Chromium Code Reviews| Index: chrome/installer/setup/install_worker.cc |
| diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc |
| index 5878c00439e338b422250972c0fa50ccb7bf8aa1..9aae50ff2bcbbfbb5a42690b011b48cf1fff1260 100644 |
| --- a/chrome/installer/setup/install_worker.cc |
| +++ b/chrome/installer/setup/install_worker.cc |
| @@ -272,7 +272,7 @@ void AddDeleteUninstallEntryForMSIWorkItems( |
| WorkItem* delete_reg_key = work_item_list->AddDeleteRegKeyWorkItem( |
| reg_root, uninstall_reg, KEY_WOW64_32KEY); |
| - delete_reg_key->set_ignore_failure(true); |
| + delete_reg_key->set_best_effort(true); |
| } |
| // Adds Chrome specific install work items to |install_list|. |
| @@ -289,17 +289,20 @@ void AddChromeWorkItems(const InstallationState& original_state, |
| const base::FilePath& target_path = installer_state.target_path(); |
| if (current_version) { |
| - // Delete the archive from an existing install to save some disk space. We |
| - // make this an unconditional work item since there's no need to roll this |
| - // back; if installation fails we'll be moved to the "-full" channel anyway. |
| + // Delete the archive from an existing install to save some disk space. |
| base::FilePath old_installer_dir( |
| installer_state.GetInstallerDirectory(*current_version)); |
| base::FilePath old_archive( |
| old_installer_dir.Append(installer::kChromeArchive)); |
| // Don't delete the archive that we are actually installing from. |
| if (archive_path != old_archive) { |
| - install_list->AddDeleteTreeWorkItem(old_archive, temp_path)-> |
| - set_ignore_failure(true); |
| + auto* delete_old_archive_work_item = |
| + install_list->AddDeleteTreeWorkItem(old_archive, temp_path); |
| + // Don't cause failure of |install_list| if this WorkItem fails. |
| + delete_old_archive_work_item->set_best_effort(true); |
| + // No need to roll this back; if installation fails we'll be moved to the |
| + // "-full" channel anyway. |
|
fdoray
2016/04/14 14:24:34
I don't understand what this comment means.
grt (UTC plus 2)
2016/04/14 15:47:02
'No need to roll this back...'
The uncompressed ar
|
| + delete_old_archive_work_item->set_allow_rollback(false); |
| } |
| } |
| @@ -374,9 +377,10 @@ void AddChromeWorkItems(const InstallationState& original_state, |
| WorkItem::ALWAYS_MOVE); |
| // Delete any old_chrome.exe if present (ignore failure if it's in use). |
| - install_list->AddDeleteTreeWorkItem( |
| - target_path.Append(installer::kChromeOldExe), temp_path)-> |
| - set_ignore_failure(true); |
| + install_list |
| + ->AddDeleteTreeWorkItem(target_path.Append(installer::kChromeOldExe), |
| + temp_path) |
| + ->set_best_effort(true); |
| } |
| // Adds work items to remove COM registration for |product|'s deprecated |
| @@ -1145,7 +1149,7 @@ void AddRegisterComDllWorkItems(const base::FilePath& dll_folder, |
| const std::vector<base::FilePath>& dll_list, |
| bool system_level, |
| bool do_register, |
| - bool ignore_failures, |
| + bool best_effort, |
| WorkItemList* work_item_list) { |
| DCHECK(work_item_list); |
| if (dll_list.empty()) { |
| @@ -1157,7 +1161,7 @@ void AddRegisterComDllWorkItems(const base::FilePath& dll_folder, |
| WorkItem* work_item = work_item_list->AddSelfRegWorkItem( |
| dll_path.value(), do_register, !system_level); |
| DCHECK(work_item); |
| - work_item->set_ignore_failure(ignore_failures); |
| + work_item->set_best_effort(best_effort); |
| } |
| } |
| } |
| @@ -1176,7 +1180,7 @@ void AddSetMsiMarkerWorkItem(const InstallerState& installer_state, |
| msi_value, |
| true); |
| DCHECK(set_msi_work_item); |
| - set_msi_work_item->set_ignore_failure(true); |
| + set_msi_work_item->set_best_effort(true); |
| set_msi_work_item->set_log_message("Could not write MSI marker!"); |
| } |