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

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

Issue 39048: Move files instead of copying them. (Closed)
Patch Set: More code review comments. Created 11 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
« no previous file with comments | « no previous file | chrome/installer/util/installer_unittests.vcproj » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/install.cc
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc
index 1c17b815a6338155408724fd6c53cd2e88f5e5ad..e58c56da9b7ccc4633a9bf602fe202ddb4db1ada 100644
--- a/chrome/installer/setup/install.cc
+++ b/chrome/installer/setup/install.cc
@@ -108,8 +108,7 @@ void AddInstallerCopyTasks(const std::wstring& exe_path,
install_list->AddCopyTreeWorkItem(exe_path, exe_dst, temp_path,
WorkItem::ALWAYS);
- install_list->AddCopyTreeWorkItem(archive_path, archive_dst, temp_path,
- WorkItem::ALWAYS);
+ install_list->AddMoveTreeWorkItem(archive_path, archive_dst, temp_path);
}
@@ -149,11 +148,11 @@ bool installer::InstallNewVersion(const std::wstring& exe_path,
install_list->AddCreateDirWorkItem(temp_dir);
install_list->AddCreateDirWorkItem(install_path);
- // Copy the version folder
- install_list->AddCopyTreeWorkItem(
+ // Move the version folder
+ install_list->AddMoveTreeWorkItem(
AppendPath(src_path, new_version.GetString()),
AppendPath(install_path, new_version.GetString()),
- temp_dir, WorkItem::ALWAYS); // Always overwrite.
+ temp_dir);
// Delete any new_chrome.exe if present (we will end up create a new one
// if required) and then copy chrome.exe
@@ -176,10 +175,10 @@ bool installer::InstallNewVersion(const std::wstring& exe_path,
// Extra executable for 64 bit systems.
if (Is64bit()) {
- install_list->AddCopyTreeWorkItem(
+ install_list->AddMoveTreeWorkItem(
AppendPath(src_path, installer::kWowHelperExe),
AppendPath(install_path, installer::kWowHelperExe),
- temp_dir, WorkItem::ALWAYS);
+ temp_dir);
}
// Copy the default Dictionaries only if the folder doesnt exist already
« no previous file with comments | « no previous file | chrome/installer/util/installer_unittests.vcproj » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698