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

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

Issue 15255004: Refactor of BrowserDistribution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rework Created 7 years, 5 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 f9f19fadf685b7dd2b2a9e9e07378c4d02747b0e..676331b3099cee3bca3f87a9140801a258da7f25 100644
--- a/chrome/installer/setup/install_worker.cc
+++ b/chrome/installer/setup/install_worker.cc
@@ -438,7 +438,8 @@ void AddDeleteUninstallShortcutsForMSIWorkItems(
LOG(ERROR) << "Failed to get location for shortcut.";
} else {
uninstall_link = uninstall_link.Append(
- product.distribution()->GetAppShortCutName());
+ product.distribution()->GetStartMenuShortcutSubfolder(
+ BrowserDistribution::SUBFOLDER_CHROME));
uninstall_link = uninstall_link.Append(
product.distribution()->GetUninstallLinkName() + installer::kLnkExt);
VLOG(1) << "Deleting old uninstall shortcut (if present): "
@@ -723,7 +724,8 @@ void AddUninstallShortcutWorkItems(const InstallerState& installer_state,
install_list->AddCreateRegKeyWorkItem(reg_root, uninstall_reg);
install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg,
installer::kUninstallDisplayNameField,
- browser_dist->GetAppShortCutName(), true);
+ browser_dist->GetDisplayName(),
+ true);
grt (UTC plus 2) 2013/07/05 17:27:37 nit: either put each argument on its own line, or
calamity 2013/07/16 04:05:17 Done.
install_list->AddSetRegValueWorkItem(reg_root,
uninstall_reg, installer::kUninstallStringField,
quoted_uninstall_cmd.GetCommandLineString(), true);
@@ -736,7 +738,7 @@ void AddUninstallShortcutWorkItems(const InstallerState& installer_state,
BrowserDistribution* dist = product.distribution();
string16 chrome_icon = ShellUtil::FormatIconLocation(
install_path.Append(dist->GetIconFilename()).value(),
- dist->GetIconIndex());
+ dist->GetIconIndex(BrowserDistribution::SHORTCUT_CHROME));
install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg,
L"DisplayIcon", chrome_icon, true);
install_list->AddSetRegValueWorkItem(reg_root, uninstall_reg,
@@ -786,7 +788,7 @@ void AddVersionKeyWorkItems(HKEY root,
string16 version_key(dist->GetVersionKey());
list->AddCreateRegKeyWorkItem(root, version_key);
- string16 product_name(dist->GetAppShortCutName());
+ string16 product_name(dist->GetDisplayName());
list->AddSetRegValueWorkItem(root, version_key, google_update::kRegNameField,
product_name, true); // overwrite name also
list->AddSetRegValueWorkItem(root, version_key,
@@ -845,7 +847,7 @@ void AddOemInstallWorkItems(const InstallationState& original_state,
if (source_product->GetOemInstall(&oem_install)) {
VLOG(1) << "Mirroring oeminstall=\"" << oem_install << "\" from "
<< BrowserDistribution::GetSpecificDistribution(source_type)->
- GetAppShortCutName();
+ GetDisplayName();
install_list->AddCreateRegKeyWorkItem(root_key, multi_key);
// Always overwrite an old value.
install_list->AddSetRegValueWorkItem(root_key, multi_key,
@@ -900,7 +902,7 @@ void AddEulaAcceptedWorkItems(const InstallationState& original_state,
if (have_eula_accepted) {
VLOG(1) << "Mirroring eulaaccepted=" << eula_accepted << " from "
<< BrowserDistribution::GetSpecificDistribution(product_type)->
- GetAppShortCutName();
+ GetDisplayName();
install_list->AddCreateRegKeyWorkItem(root_key, multi_key);
install_list->AddSetRegValueWorkItem(
root_key, multi_key, google_update::kRegEULAAceptedField,
@@ -1439,7 +1441,7 @@ void AddDelegateExecuteWorkItems(const InstallerState& installer_state,
CleanupBadCanaryDelegateExecuteRegistration(target_path, list);
} else {
VLOG(1) << "No DelegateExecute verb handler processing to do for "
- << distribution->GetAppShortCutName();
+ << distribution->GetDisplayName();
}
return;
}
@@ -1501,7 +1503,7 @@ void AddActiveSetupWorkItems(const InstallerState& installer_state,
const char* install_level =
installer_state.system_install() ? "system" : "user";
VLOG(1) << "No Active Setup processing to do for " << install_level
- << "-level " << distribution->GetAppShortCutName();
+ << "-level " << distribution->GetDisplayName();
return;
}
DCHECK(installer_state.RequiresActiveSetup());
@@ -1513,7 +1515,7 @@ void AddActiveSetupWorkItems(const InstallerState& installer_state,
VLOG(1) << "Adding registration items for Active Setup.";
list->AddCreateRegKeyWorkItem(root, active_setup_path);
list->AddSetRegValueWorkItem(root, active_setup_path, L"",
- distribution->GetAppShortCutName(), true);
+ distribution->GetDisplayName(), true);
base::FilePath active_setup_exe(installer_state.GetInstallerDirectory(
new_version).Append(kActiveSetupExe));
@@ -1528,7 +1530,7 @@ void AddActiveSetupWorkItems(const InstallerState& installer_state,
// TODO(grt): http://crbug.com/75152 Write a reference to a localized
// resource.
list->AddSetRegValueWorkItem(root, active_setup_path, L"Localized Name",
- distribution->GetAppShortCutName(), true);
+ distribution->GetDisplayName(), true);
list->AddSetRegValueWorkItem(root, active_setup_path, L"IsInstalled",
static_cast<DWORD>(1U), true);

Powered by Google App Engine
This is Rietveld 408576698