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

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

Issue 1986823002: Reset user data directory and disk cache directory after downgrade. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cr 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/install_worker.cc
diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc
index 830a3a3aed1f1af56770b425ebabd80b43fcdaa1..933cb76a896fb3db25d62196dcec35e92a63f6e7 100644
--- a/chrome/installer/setup/install_worker.cc
+++ b/chrome/installer/setup/install_worker.cc
@@ -228,7 +228,7 @@ void AddProductSpecificWorkItems(const InstallationState& original_state,
const InstallerState& installer_state,
const base::FilePath& setup_path,
const Version& new_version,
- bool is_new_install,
+ const Version* current_version,
bool add_language_identifier,
WorkItemList* list) {
const Products& products = installer_state.products();
@@ -238,8 +238,8 @@ void AddProductSpecificWorkItems(const InstallationState& original_state,
if (p.is_chrome()) {
AddOsUpgradeWorkItems(installer_state, setup_path, new_version, p,
list);
- AddFirewallRulesWorkItems(
- installer_state, p.distribution(), is_new_install, list);
+ AddFirewallRulesWorkItems(installer_state, p.distribution(),
+ current_version == nullptr, list);
#if defined(GOOGLE_CHROME_BUILD)
if (!InstallUtil::IsChromeSxSProcess()) {
@@ -249,6 +249,9 @@ void AddProductSpecificWorkItems(const InstallationState& original_state,
new_version, add_language_identifier, list);
}
#endif // GOOGLE_CHROME_BUILD
+ InstallUtil::AddUpdateDowngradeVersionItem(installer_state.root_key(),
+ *current_version, new_version,
grt (UTC plus 2) 2016/05/20 15:25:05 |current_version| is null on a new install, so you
zmin 2016/05/20 16:33:05 make sense, I'll update it.
+ p.distribution(), list);
}
if (p.is_chrome_binaries())
AddQuickEnableChromeFrameWorkItems(installer_state, list);
@@ -1119,13 +1122,9 @@ void AddInstallWorkItems(const InstallationState& original_state,
// Add any remaining work items that involve special settings for
// each product.
- AddProductSpecificWorkItems(original_state,
- installer_state,
- setup_path,
- new_version,
- current_version == NULL,
- add_language_identifier,
- install_list);
+ AddProductSpecificWorkItems(original_state, installer_state, setup_path,
+ new_version, current_version,
+ add_language_identifier, install_list);
// Copy over brand, usagestats, and other values.
AddGoogleUpdateWorkItems(original_state, installer_state, install_list);

Powered by Google App Engine
This is Rietveld 408576698