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

Unified Diff: chrome/installer/util/installer_state.h

Issue 1764053002: Revert of Delete old files after an update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « chrome/installer/util/delete_old_versions_unittest.cc ('k') | chrome/installer/util/installer_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/installer_state.h
diff --git a/chrome/installer/util/installer_state.h b/chrome/installer/util/installer_state.h
index 1de3000b8fae674bc737d71184a4059c059ffb64..2b624659c56b5e04cb7b4d43e2e0a2c7d76e7b6e 100644
--- a/chrome/installer/util/installer_state.h
+++ b/chrome/installer/util/installer_state.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <set>
#include <string>
#include <vector>
@@ -177,6 +178,13 @@
// (for example <target_path>\Google\Chrome\Application\<Version>\Installer)
base::FilePath GetInstallerDirectory(const base::Version& version) const;
+ // Try to delete all directories under |temp_path| whose versions are less
+ // than |new_version| and not equal to |existing_version|. |existing_version|
+ // may be NULL.
+ void RemoveOldVersionDirectories(const base::Version& new_version,
+ base::Version* existing_version,
+ const base::FilePath& temp_path) const;
+
// Adds to |com_dll_list| the list of COM DLLs that are to be registered
// and/or unregistered. The list may be empty.
void AddComDllList(std::vector<base::FilePath>* com_dll_list) const;
@@ -235,6 +243,11 @@
bool IsMultiInstallUpdate(const MasterPreferences& prefs,
const InstallationState& machine_state);
+ // Enumerates all files named one of
+ // [chrome.exe, old_chrome.exe, new_chrome.exe] in target_path_ and
+ // returns their version numbers in a set.
+ void GetExistingExeVersions(std::set<std::string>* existing_versions) const;
+
// Sets this object's level and updates the root_key_ accordingly.
void set_level(Level level);
« no previous file with comments | « chrome/installer/util/delete_old_versions_unittest.cc ('k') | chrome/installer/util/installer_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698