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

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

Issue 1976443005: Revert of Add best-effort/allow rollback flags on WorkItem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simple_list_tests
Patch Set: Created 4 years, 7 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 | « chrome/installer/setup/install_worker.h ('k') | chrome/installer/setup/install_worker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/install_worker.cc
diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc
index f8502e90fd23bddb01cb5926fc7f606669a084e9..b717eb9f5b5eb3435e86b23fb7a606cd05b88d18 100644
--- a/chrome/installer/setup/install_worker.cc
+++ b/chrome/installer/setup/install_worker.cc
@@ -272,7 +272,7 @@
WorkItem* delete_reg_key = work_item_list->AddDeleteRegKeyWorkItem(
reg_root, uninstall_reg, KEY_WOW64_32KEY);
- delete_reg_key->set_best_effort(true);
+ delete_reg_key->set_ignore_failure(true);
}
// Adds Chrome specific install work items to |install_list|.
@@ -289,20 +289,17 @@
const base::FilePath& target_path = installer_state.target_path();
if (current_version) {
- // Delete the archive from an existing install to save some disk space.
+ // 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.
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) {
- 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.
- delete_old_archive_work_item->set_rollback_enabled(false);
+ install_list->AddDeleteTreeWorkItem(old_archive, temp_path)->
+ set_ignore_failure(true);
}
}
@@ -377,10 +374,9 @@
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_best_effort(true);
+ install_list->AddDeleteTreeWorkItem(
+ target_path.Append(installer::kChromeOldExe), temp_path)->
+ set_ignore_failure(true);
}
// Adds work items to remove COM registration for |product|'s deprecated
@@ -1148,7 +1144,7 @@
const std::vector<base::FilePath>& dll_list,
bool system_level,
bool do_register,
- bool best_effort,
+ bool ignore_failures,
WorkItemList* work_item_list) {
DCHECK(work_item_list);
if (dll_list.empty()) {
@@ -1160,7 +1156,7 @@
WorkItem* work_item = work_item_list->AddSelfRegWorkItem(
dll_path.value(), do_register, !system_level);
DCHECK(work_item);
- work_item->set_best_effort(best_effort);
+ work_item->set_ignore_failure(ignore_failures);
}
}
}
@@ -1179,7 +1175,7 @@
msi_value,
true);
DCHECK(set_msi_work_item);
- set_msi_work_item->set_best_effort(true);
+ set_msi_work_item->set_ignore_failure(true);
set_msi_work_item->set_log_message("Could not write MSI marker!");
}
« no previous file with comments | « chrome/installer/setup/install_worker.h ('k') | chrome/installer/setup/install_worker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698