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

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

Issue 1666363002: Delete old files after an update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self-review Created 4 years, 10 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/install_worker.cc
diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc
index 5878c00439e338b422250972c0fa50ccb7bf8aa1..3f5b8d4adc56964fd08bdc813bf559af60f94d2b 100644
--- a/chrome/installer/setup/install_worker.cc
+++ b/chrome/installer/setup/install_worker.cc
@@ -40,6 +40,7 @@
#include "chrome/installer/util/callback_work_item.h"
#include "chrome/installer/util/conditional_work_item_list.h"
#include "chrome/installer/util/create_reg_key_work_item.h"
+#include "chrome/installer/util/delete_old_versions.h"
#include "chrome/installer/util/firewall_manager_win.h"
#include "chrome/installer/util/google_update_constants.h"
#include "chrome/installer/util/helper.h"
@@ -1008,6 +1009,16 @@ bool AppendPostInstallTasks(const InstallerState& installer_state,
post_install_task_list->AddWorkItem(regular_update_work_items.release());
}
+ // If this is a regular update (chrome.exe not in use), this step will try to
+ // delete files from all versions except the one that was just installed.
+ // Otherwise, it will try to delete files from all versions except the one
+ // that is in use and the one that was just installed.
+ //
+ // TODO(fdoray): Launch a cleanup process if this fails during a regular
+ // update. crbug.com/451546
+ AddDeleteOldVersionsWorkItem(installer_state, post_install_task_list)
+ ->set_ignore_failure(true);
grt (UTC plus 2) 2016/02/25 19:25:40 is it reasonable to do this in the Add function? i
fdoray 2016/02/26 17:00:05 Done. In my previous patch, I didn't to it inside
+
AddRegisterComDllWorkItemsForPackage(installer_state, current_version,
new_version, post_install_task_list);

Powered by Google App Engine
This is Rietveld 408576698