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

Side by Side Diff: chrome/installer/setup/uninstall.cc

Issue 297233010: Revert 273108 "Omaha configuration parameters now use Wow6432Nod..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2017/src/
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/util/app_command.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This file defines the methods useful for uninstalling Chrome. 5 // This file defines the methods useful for uninstalling Chrome.
6 6
7 #include "chrome/installer/setup/uninstall.h" 7 #include "chrome/installer/setup/uninstall.h"
8 8
9 #include <windows.h> 9 #include <windows.h>
10 10
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 const ProductState* product_state = 90 const ProductState* product_state =
91 original_state.GetProductState(system_level, dist_type); 91 original_state.GetProductState(system_level, dist_type);
92 // Only modify other products if they're installed and multi. 92 // Only modify other products if they're installed and multi.
93 if (product_state != NULL && 93 if (product_state != NULL &&
94 product_state->is_multi_install() && 94 product_state->is_multi_install() &&
95 !product_state->channel().Equals(channel_info)) { 95 !product_state->channel().Equals(channel_info)) {
96 BrowserDistribution* other_dist = 96 BrowserDistribution* other_dist =
97 BrowserDistribution::GetSpecificDistribution(dist_type); 97 BrowserDistribution::GetSpecificDistribution(dist_type);
98 update_list->AddSetRegValueWorkItem(reg_root, 98 update_list->AddSetRegValueWorkItem(reg_root,
99 other_dist->GetStateKey(), 99 other_dist->GetStateKey(),
100 KEY_WOW64_32KEY, 100 WorkItem::kWow64Default,
101 google_update::kRegApField, 101 google_update::kRegApField,
102 channel_info.value(), 102 channel_info.value(),
103 true); 103 true);
104 } else { 104 } else {
105 LOG_IF(ERROR, 105 LOG_IF(ERROR,
106 product_state != NULL && product_state->is_multi_install()) 106 product_state != NULL && product_state->is_multi_install())
107 << "Channel value for " 107 << "Channel value for "
108 << BrowserDistribution::GetSpecificDistribution( 108 << BrowserDistribution::GetSpecificDistribution(
109 dist_type)->GetDisplayName() 109 dist_type)->GetDisplayName()
110 << " is somehow already set to the desired new value of " 110 << " is somehow already set to the desired new value of "
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 1172
1173 // Delete the registry keys (Uninstall key and Version key). 1173 // Delete the registry keys (Uninstall key and Version key).
1174 HKEY reg_root = installer_state.root_key(); 1174 HKEY reg_root = installer_state.root_key();
1175 1175
1176 // Note that we must retrieve the distribution-specific data before deleting 1176 // Note that we must retrieve the distribution-specific data before deleting
1177 // product.GetVersionKey(). 1177 // product.GetVersionKey().
1178 base::string16 distribution_data(browser_dist->GetDistributionData(reg_root)); 1178 base::string16 distribution_data(browser_dist->GetDistributionData(reg_root));
1179 1179
1180 // Remove Control Panel uninstall link. 1180 // Remove Control Panel uninstall link.
1181 if (product.ShouldCreateUninstallEntry()) { 1181 if (product.ShouldCreateUninstallEntry()) {
1182 InstallUtil::DeleteRegistryKey( 1182 InstallUtil::DeleteRegistryKey(reg_root,
1183 reg_root, browser_dist->GetUninstallRegPath(), KEY_WOW64_32KEY); 1183 browser_dist->GetUninstallRegPath(),
1184 WorkItem::kWow64Default);
1184 } 1185 }
1185 1186
1186 // Remove Omaha product key. 1187 // Remove Omaha product key.
1187 InstallUtil::DeleteRegistryKey( 1188 InstallUtil::DeleteRegistryKey(reg_root, browser_dist->GetVersionKey(),
1188 reg_root, browser_dist->GetVersionKey(), KEY_WOW64_32KEY); 1189 WorkItem::kWow64Default);
1189 1190
1190 // Also try to delete the MSI value in the ClientState key (it might not be 1191 // Also try to delete the MSI value in the ClientState key (it might not be
1191 // there). This is due to a Google Update behaviour where an uninstall and a 1192 // there). This is due to a Google Update behaviour where an uninstall and a
1192 // rapid reinstall might result in stale values from the old ClientState key 1193 // rapid reinstall might result in stale values from the old ClientState key
1193 // being picked up on reinstall. 1194 // being picked up on reinstall.
1194 product.SetMsiMarker(installer_state.system_install(), false); 1195 product.SetMsiMarker(installer_state.system_install(), false);
1195 1196
1196 InstallStatus ret = installer::UNKNOWN_STATUS; 1197 InstallStatus ret = installer::UNKNOWN_STATUS;
1197 1198
1198 if (is_chrome) { 1199 if (is_chrome) {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 chrome_launcher_support::INSTALLED_AT_USER_LEVEL; 1274 chrome_launcher_support::INSTALLED_AT_USER_LEVEL;
1274 bool has_legacy_app_launcher = level_to_check == 1275 bool has_legacy_app_launcher = level_to_check ==
1275 chrome_launcher_support::GetAppLauncherInstallationState(); 1276 chrome_launcher_support::GetAppLauncherInstallationState();
1276 if (!has_legacy_app_launcher) { 1277 if (!has_legacy_app_launcher) {
1277 BrowserDistribution* shadow_app_launcher_dist = 1278 BrowserDistribution* shadow_app_launcher_dist =
1278 BrowserDistribution::GetSpecificDistribution( 1279 BrowserDistribution::GetSpecificDistribution(
1279 BrowserDistribution::CHROME_APP_HOST); 1280 BrowserDistribution::CHROME_APP_HOST);
1280 InstallUtil::DeleteRegistryKey( 1281 InstallUtil::DeleteRegistryKey(
1281 reg_root, 1282 reg_root,
1282 shadow_app_launcher_dist->GetVersionKey(), 1283 shadow_app_launcher_dist->GetVersionKey(),
1283 KEY_WOW64_32KEY); 1284 WorkItem::kWow64Default);
1284 } 1285 }
1285 } 1286 }
1286 } 1287 }
1287 1288
1288 if (installer_state.is_multi_install()) 1289 if (installer_state.is_multi_install())
1289 ProcessGoogleUpdateItems(original_state, installer_state, product); 1290 ProcessGoogleUpdateItems(original_state, installer_state, product);
1290 1291
1291 // Get the state of the installed product (if any) 1292 // Get the state of the installed product (if any)
1292 const ProductState* product_state = 1293 const ProductState* product_state =
1293 original_state.GetProductState(installer_state.system_install(), 1294 original_state.GetProductState(installer_state.system_install(),
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 // If we need a reboot to continue, schedule the parent directories for 1458 // If we need a reboot to continue, schedule the parent directories for
1458 // deletion unconditionally. If they are not empty, the session manager 1459 // deletion unconditionally. If they are not empty, the session manager
1459 // will not delete them on reboot. 1460 // will not delete them on reboot.
1460 ScheduleParentAndGrandparentForDeletion(target_path); 1461 ScheduleParentAndGrandparentForDeletion(target_path);
1461 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { 1462 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) {
1462 *uninstall_status = UNINSTALL_FAILED; 1463 *uninstall_status = UNINSTALL_FAILED;
1463 } 1464 }
1464 } 1465 }
1465 1466
1466 } // namespace installer 1467 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/util/app_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698