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

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

Issue 282363003: Add WOW64 support to the installer registry work items (Closed) Base URL: https://chromium.googlesource.com/chromium/src
Patch Set: add wow64 logic to installer_util. mini_installer tests. Created 6 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/uninstall.cc
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc
index 353e3900539c46ef194c31c59db507ddbe22c1f6..b59647217e88d42dcdfe08bf3cf85b2eaacfe0d2 100644
--- a/chrome/installer/setup/uninstall.cc
+++ b/chrome/installer/setup/uninstall.cc
@@ -46,6 +46,7 @@
#include "chrome/installer/util/self_cleaning_temp_dir.h"
#include "chrome/installer/util/shell_util.h"
#include "chrome/installer/util/util_constants.h"
+#include "chrome/installer/util/work_item.h"
#include "content/public/common/result_codes.h"
#include "rlz/lib/rlz_lib.h"
@@ -94,8 +95,12 @@ void AddChannelValueUpdateWorkItems(
!product_state->channel().Equals(channel_info)) {
BrowserDistribution* other_dist =
BrowserDistribution::GetSpecificDistribution(dist_type);
- update_list->AddSetRegValueWorkItem(reg_root, other_dist->GetStateKey(),
- google_update::kRegApField, channel_info.value(), true);
+ update_list->AddSetRegValueWorkItem(reg_root,
+ other_dist->GetStateKey(),
+ google_update::kRegApField,
+ channel_info.value(),
+ true,
+ WorkItem::kWow64Default);
} else {
LOG_IF(ERROR,
product_state != NULL && product_state->is_multi_install())
@@ -681,7 +686,7 @@ void RemoveFiletypeRegistration(const InstallerState& installer_state,
++filetype) {
if (InstallUtil::DeleteRegistryValueIf(
root, (classes_path + *filetype).c_str(), NULL,
- prog_id_pred) == InstallUtil::DELETED) {
+ prog_id_pred, WorkItem::kWow64Default) == InstallUtil::DELETED) {
cleared_assocs.push_back(*filetype);
}
}
@@ -755,7 +760,8 @@ void UninstallActiveSetupEntries(const InstallerState& installer_state,
const base::string16 active_setup_path(
InstallUtil::GetActiveSetupPath(distribution));
- InstallUtil::DeleteRegistryKey(HKEY_LOCAL_MACHINE, active_setup_path);
+ InstallUtil::DeleteRegistryKey(HKEY_LOCAL_MACHINE, active_setup_path,
+ WorkItem::kWow64Default);
// Windows leaves keys behind in HKCU\\Software\\(Wow6432Node\\)?Microsoft\\
// Active Setup\\Installed Components\\{guid}
@@ -901,7 +907,7 @@ bool DeleteChromeRegistrationKeys(const InstallerState& installer_state,
base::string16 reg_prog_id(ShellUtil::kRegClasses);
reg_prog_id.push_back(base::FilePath::kSeparators[0]);
reg_prog_id.append(prog_id);
- InstallUtil::DeleteRegistryKey(root, reg_prog_id);
+ InstallUtil::DeleteRegistryKey(root, reg_prog_id, WorkItem::kWow64Default);
// Delete Software\Classes\Chrome.
base::string16 reg_app_id(ShellUtil::kRegClasses);
@@ -909,7 +915,7 @@ bool DeleteChromeRegistrationKeys(const InstallerState& installer_state,
// Append the requested suffix manually here (as ShellUtil::GetBrowserModelId
// would otherwise try to figure out the currently installed suffix).
reg_app_id.append(dist->GetBaseAppId() + browser_entry_suffix);
- InstallUtil::DeleteRegistryKey(root, reg_app_id);
+ InstallUtil::DeleteRegistryKey(root, reg_app_id, WorkItem::kWow64Default);
// Delete all Start Menu Internet registrations that refer to this Chrome.
{
@@ -926,12 +932,13 @@ bool DeleteChromeRegistrationKeys(const InstallerState& installer_state,
.append(client_name);
open_key.assign(client_key).append(ShellUtil::kRegShellOpen);
if (InstallUtil::DeleteRegistryKeyIf(root, client_key, open_key, NULL,
- open_command_pred) != InstallUtil::NOT_FOUND) {
+ open_command_pred, WorkItem::kWow64Default)
+ != InstallUtil::NOT_FOUND) {
// Delete the default value of SOFTWARE\Clients\StartMenuInternet if it
// references this Chrome (i.e., if it was made the default browser).
InstallUtil::DeleteRegistryValueIf(
root, ShellUtil::kRegStartMenuInternet, NULL,
- InstallUtil::ValueEquals(client_name));
+ InstallUtil::ValueEquals(client_name), WorkItem::kWow64Default);
// Also delete the value for the default user if we're operating in
// HKLM.
if (root == HKEY_LOCAL_MACHINE) {
@@ -939,7 +946,8 @@ bool DeleteChromeRegistrationKeys(const InstallerState& installer_state,
HKEY_USERS,
base::string16(L".DEFAULT\\").append(
ShellUtil::kRegStartMenuInternet).c_str(),
- NULL, InstallUtil::ValueEquals(client_name));
+ NULL, InstallUtil::ValueEquals(client_name),
+ WorkItem::kWow64Default);
}
}
}
@@ -957,12 +965,12 @@ bool DeleteChromeRegistrationKeys(const InstallerState& installer_state,
app_key.append(L"Applications");
app_key.push_back(base::FilePath::kSeparators[0]);
app_key.append(installer::kChromeExe);
- InstallUtil::DeleteRegistryKey(root, app_key);
+ InstallUtil::DeleteRegistryKey(root, app_key, WorkItem::kWow64Default);
base::string16 app_path_key(ShellUtil::kAppPathsRegistryKey);
app_path_key.push_back(base::FilePath::kSeparators[0]);
app_path_key.append(installer::kChromeExe);
- InstallUtil::DeleteRegistryKey(root, app_path_key);
+ InstallUtil::DeleteRegistryKey(root, app_path_key, WorkItem::kWow64Default);
// Cleanup OpenWithList and OpenWithProgids:
// http://msdn.microsoft.com/en-us/library/bb166549
@@ -979,7 +987,8 @@ bool DeleteChromeRegistrationKeys(const InstallerState& installer_state,
open_with_list_key.append(L"OpenWithList");
open_with_list_key.push_back(base::FilePath::kSeparators[0]);
open_with_list_key.append(installer::kChromeExe);
- InstallUtil::DeleteRegistryKey(root, open_with_list_key);
+ InstallUtil::DeleteRegistryKey(
+ root, open_with_list_key, WorkItem::kWow64Default);
open_with_progids_key.assign(file_assoc_key);
open_with_progids_key.append(ShellUtil::kRegOpenWithProgids);
@@ -994,7 +1003,8 @@ bool DeleteChromeRegistrationKeys(const InstallerState& installer_state,
// lives in HKLM.
InstallUtil::DeleteRegistryValueIf(
root, ShellUtil::kRegStartMenuInternet, NULL,
- InstallUtil::ValueEquals(dist->GetBaseAppName() + browser_entry_suffix));
+ InstallUtil::ValueEquals(dist->GetBaseAppName() + browser_entry_suffix),
+ WorkItem::kWow64Default);
// Delete each protocol association if it references this Chrome.
InstallUtil::ProgramCompare open_command_pred(chrome_exe);
@@ -1010,7 +1020,8 @@ bool DeleteChromeRegistrationKeys(const InstallerState& installer_state,
parent_key.append(*proto);
child_key.assign(parent_key).append(ShellUtil::kRegShellOpen);
InstallUtil::DeleteRegistryKeyIf(root, parent_key, child_key, NULL,
- open_command_pred);
+ open_command_pred,
+ WorkItem::kWow64Default);
}
RemoveFiletypeRegistration(installer_state, root, browser_entry_suffix);
@@ -1042,13 +1053,15 @@ const wchar_t kChromeExtProgId[] = L"ChromiumExt";
ext_prog_id.push_back(base::FilePath::kSeparators[0]);
ext_prog_id.append(kChromeExtProgId);
ext_prog_id.append(suffix);
- InstallUtil::DeleteRegistryKey(roots[i], ext_prog_id);
+ InstallUtil::DeleteRegistryKey(roots[i], ext_prog_id,
+ WorkItem::kWow64Default);
// Delete Software\Classes\.crx,
base::string16 ext_association(ShellUtil::kRegClasses);
ext_association.append(L"\\");
ext_association.append(L".crx");
- InstallUtil::DeleteRegistryKey(roots[i], ext_association);
+ InstallUtil::DeleteRegistryKey(roots[i], ext_association,
+ WorkItem::kWow64Default);
}
}
@@ -1128,7 +1141,8 @@ InstallStatus UninstallProduct(const InstallationState& original_state,
// Delete the key that delegate_execute might make.
if (base::win::GetVersion() >= base::win::VERSION_WIN8) {
InstallUtil::DeleteRegistryKey(HKEY_CURRENT_USER,
- chrome::kMetroRegistryPath);
+ chrome::kMetroRegistryPath,
+ WorkItem::kWow64Default);
}
auto_launch_util::DisableAllAutoStartFeatures(
@@ -1165,11 +1179,13 @@ InstallStatus UninstallProduct(const InstallationState& original_state,
// Remove Control Panel uninstall link.
if (product.ShouldCreateUninstallEntry()) {
InstallUtil::DeleteRegistryKey(reg_root,
- browser_dist->GetUninstallRegPath());
+ browser_dist->GetUninstallRegPath(),
+ WorkItem::kWow64Default);
}
// Remove Omaha product key.
- InstallUtil::DeleteRegistryKey(reg_root, browser_dist->GetVersionKey());
+ InstallUtil::DeleteRegistryKey(reg_root, browser_dist->GetVersionKey(),
+ WorkItem::kWow64Default);
// Also try to delete the MSI value in the ClientState key (it might not be
// there). This is due to a Google Update behaviour where an uninstall and a
@@ -1261,8 +1277,10 @@ InstallStatus UninstallProduct(const InstallationState& original_state,
BrowserDistribution* shadow_app_launcher_dist =
BrowserDistribution::GetSpecificDistribution(
BrowserDistribution::CHROME_APP_HOST);
- InstallUtil::DeleteRegistryKey(reg_root,
- shadow_app_launcher_dist->GetVersionKey());
+ InstallUtil::DeleteRegistryKey(
+ reg_root,
+ shadow_app_launcher_dist->GetVersionKey(),
+ WorkItem::kWow64Default);
}
}
}
@@ -1285,7 +1303,8 @@ InstallStatus UninstallProduct(const InstallationState& original_state,
base::string16 reg_path(installer::kMediaPlayerRegPath);
reg_path.push_back(base::FilePath::kSeparators[0]);
reg_path.append(installer::kChromeExe);
- InstallUtil::DeleteRegistryKey(HKEY_LOCAL_MACHINE, reg_path);
+ InstallUtil::DeleteRegistryKey(HKEY_LOCAL_MACHINE, reg_path,
+ WorkItem::kWow64Default);
}
// Unregister any dll servers that we may have registered for this

Powered by Google App Engine
This is Rietveld 408576698