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

Unified Diff: chrome/installer/setup/uninstall.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
Index: chrome/installer/setup/uninstall.cc
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc
index 4eb2347d8c157cd5587def8324cc83674f1f0e4a..3bd54a7e0f3e7ee6d5646040169d6609ca111e8d 100644
--- a/chrome/installer/setup/uninstall.cc
+++ b/chrome/installer/setup/uninstall.cc
@@ -138,10 +138,8 @@
// Apply the new channel value to all other products and to the multi package.
if (modified) {
- std::unique_ptr<WorkItemList> update_list(WorkItem::CreateWorkItemList());
- update_list->set_log_message("Channel Value Update");
- update_list->set_best_effort(true);
- update_list->set_rollback_enabled(false);
+ std::unique_ptr<WorkItemList> update_list(
+ WorkItem::CreateNoRollbackWorkItemList());
std::vector<BrowserDistribution::Type> dist_types;
for (size_t i = 0; i < BrowserDistribution::NUM_TYPES; ++i) {
BrowserDistribution::Type other_dist_type =
@@ -152,18 +150,16 @@
AddChannelValueUpdateWorkItems(original_state, installer_state,
channel_info, dist_types,
update_list.get());
- update_list->Do();
+ bool success = update_list->Do();
+ LOG_IF(ERROR, !success) << "Failed updating channel values.";
}
}
// Processes uninstall WorkItems from install_worker in no-rollback-list.
void ProcessChromeWorkItems(const InstallerState& installer_state,
const Product& product) {
- std::unique_ptr<WorkItemList> work_item_list(WorkItem::CreateWorkItemList());
- work_item_list->set_log_message(
- "Cleanup OS upgrade command and deprecated per-user registrations");
- work_item_list->set_best_effort(true);
- work_item_list->set_rollback_enabled(false);
+ std::unique_ptr<WorkItemList> work_item_list(
+ WorkItem::CreateNoRollbackWorkItemList());
AddOsUpgradeWorkItems(installer_state, base::FilePath(), Version(), product,
work_item_list.get());
// Perform a best-effort cleanup of per-user keys. On system-level installs
@@ -172,14 +168,13 @@
// for all users solely for this cleanup).
AddCleanupDeprecatedPerUserRegistrationsWorkItems(product,
work_item_list.get());
- work_item_list->Do();
+ if (!work_item_list->Do())
+ LOG(ERROR) << "Failed to process Chrome WorkItems.";
}
void ProcessIELowRightsPolicyWorkItems(const InstallerState& installer_state) {
- std::unique_ptr<WorkItemList> work_items(WorkItem::CreateWorkItemList());
- work_items->set_log_message("Delete old IE low rights policy");
- work_items->set_best_effort(true);
- work_items->set_rollback_enabled(false);
+ std::unique_ptr<WorkItemList> work_items(
+ WorkItem::CreateNoRollbackWorkItemList());
AddDeleteOldIELowRightsPolicyWorkItems(installer_state, work_items.get());
work_items->Do();
RefreshElevationPolicy();
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/setup/update_active_setup_version_work_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698