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

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

Issue 6683005: Delete chrome.7z archives in the current installation when doing an upgrade t... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 | « no previous file | chrome/installer/util/delete_tree_work_item.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
===================================================================
--- chrome/installer/setup/install_worker.cc (revision 77927)
+++ chrome/installer/setup/install_worker.cc (working copy)
@@ -488,10 +488,20 @@
install_list->AddCreateDirWorkItem(temp_path);
install_list->AddCreateDirWorkItem(target_path);
+ if (current_version != NULL && current_version->get() != NULL) {
+ // 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.
+ FilePath old_installer_dir(
+ installer_state.GetInstallerDirectory(**current_version));
+ FilePath old_archive(old_installer_dir.Append(archive_path.BaseName()));
+ install_list->AddDeleteTreeWorkItem(old_archive, temp_path)
+ ->set_ignore_failure(true);
+ }
+
// Delete any new_chrome.exe if present (we will end up creating a new one
// if required) and then copy chrome.exe
- FilePath new_chrome_exe(
- target_path.Append(installer::kChromeNewExe));
+ FilePath new_chrome_exe(target_path.Append(installer::kChromeNewExe));
install_list->AddDeleteTreeWorkItem(new_chrome_exe, temp_path);
install_list->AddCopyTreeWorkItem(
« no previous file with comments | « no previous file | chrome/installer/util/delete_tree_work_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698