diff options
author | huanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-26 01:16:39 +0000 |
---|---|---|
committer | huanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-26 01:16:39 +0000 |
commit | d08afaede69bbd856a878b86c99f43a4636c1757 (patch) | |
tree | d5e41d82121d68bdf3bf9c9a5b38e4cafd1117df | |
parent | 23ce6e01ad8be836a2555ca738a63dd4c4e26da1 (diff) | |
download | chromium_src-d08afaede69bbd856a878b86c99f43a4636c1757.zip chromium_src-d08afaede69bbd856a878b86c99f43a4636c1757.tar.gz chromium_src-d08afaede69bbd856a878b86c99f43a4636c1757.tar.bz2 |
Use different short cut names for SxS installation.
This change includes: desktop shortcut, quick launch short cut,
short cut name in start menu, add/remove program name.
BUG=35574
TEST=Run "setup --chrome-sxs" and Chrome is installed with different short cut.
Review URL: http://codereview.chromium.org/661051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40086 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/app/chromium_strings.grd | 3 | ||||
-rw-r--r-- | chrome/app/google_chrome_strings.grd | 3 | ||||
-rw-r--r-- | chrome/installer/setup/install.cc | 4 | ||||
-rw-r--r-- | chrome/installer/setup/uninstall.cc | 2 | ||||
-rw-r--r-- | chrome/installer/util/browser_distribution.cc | 4 | ||||
-rw-r--r-- | chrome/installer/util/browser_distribution.h | 2 | ||||
-rw-r--r-- | chrome/installer/util/google_chrome_sxs_distribution.cc | 7 | ||||
-rw-r--r-- | chrome/installer/util/google_chrome_sxs_distribution.h | 2 | ||||
-rwxr-xr-x | chrome/installer/util/prebuild/create_string_rc.py | 1 | ||||
-rw-r--r-- | chrome/installer/util/shell_util.cc | 2 |
10 files changed, 26 insertions, 4 deletions
diff --git a/chrome/app/chromium_strings.grd b/chrome/app/chromium_strings.grd index 7120cde..fc8f89d 100644 --- a/chrome/app/chromium_strings.grd +++ b/chrome/app/chromium_strings.grd @@ -127,6 +127,9 @@ be available for now. --> <message name="IDS_PRODUCT_NAME" desc="The Chrome application name"> Chromium </message> + <message name="IDS_SXS_SHORTCUT_NAME" desc="The Chrome short cut name for SxS channel"> + Chromium + </message> <message name="IDS_PRODUCT_DESCRIPTION" desc="Browser description"> Chromium is a web browser that runs web pages and applications with lightning speed. It's fast, stable, and easy to use. Browse the web more safely with malware and phishing protection built into Chromium. </message> diff --git a/chrome/app/google_chrome_strings.grd b/chrome/app/google_chrome_strings.grd index b2dacaf..0c22811 100644 --- a/chrome/app/google_chrome_strings.grd +++ b/chrome/app/google_chrome_strings.grd @@ -177,6 +177,9 @@ Chrome supports. --> <message name="IDS_PRODUCT_NAME" desc="The Chrome application name"> Google Chrome </message> + <message name="IDS_SXS_SHORTCUT_NAME" desc="The Chrome short cut name for SxS channel"> + Google Chrome Exp + </message> <message name="IDS_PRODUCT_DESCRIPTION" desc="Browser description"> Google Chrome is a web browser that runs web pages and applications with lightning speed. It's fast, stable, and easy to use. Browse the web more safely with malware and phishing protection built into Google Chrome. </message> diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc index d3533d4..1c8c903 100644 --- a/chrome/installer/setup/install.cc +++ b/chrome/installer/setup/install.cc @@ -219,7 +219,7 @@ bool CreateOrUpdateChromeShortcuts(const std::wstring& exe_path, // The location of Start->Programs->Google Chrome folder BrowserDistribution* dist = BrowserDistribution::GetDistribution(); - const std::wstring& product_name = dist->GetApplicationName(); + const std::wstring& product_name = dist->GetAppShortCutName(); const std::wstring& product_desc = dist->GetAppDescription(); shortcut_path = shortcut_path.Append(product_name); @@ -551,7 +551,7 @@ installer_util::InstallStatus InstallNewVersion( AddInstallerCopyTasks(exe_path, archive_path, temp_dir, install_path, new_version.GetString(), install_list.get(), (reg_root == HKEY_LOCAL_MACHINE)); - std::wstring product_name = dist->GetApplicationName(); + std::wstring product_name = dist->GetAppShortCutName(); AddUninstallShortcutWorkItems(reg_root, exe_path, install_path, product_name, new_version.GetString(), install_list.get()); diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc index b943e87..049acc6 100644 --- a/chrome/installer/setup/uninstall.cc +++ b/chrome/installer/setup/uninstall.cc @@ -110,7 +110,7 @@ void DeleteChromeShortcuts(bool system_uninstall) { LOG(ERROR) << "Failed to get location for shortcut."; } else { BrowserDistribution* dist = BrowserDistribution::GetDistribution(); - shortcut_path = shortcut_path.Append(dist->GetApplicationName()); + shortcut_path = shortcut_path.Append(dist->GetAppShortCutName()); LOG(INFO) << "Deleting shortcut " << shortcut_path.value(); if (!file_util::Delete(shortcut_path, true)) LOG(ERROR) << "Failed to delete folder: " << shortcut_path.value(); diff --git a/chrome/installer/util/browser_distribution.cc b/chrome/installer/util/browser_distribution.cc index 27bb8d6..32454f9 100644 --- a/chrome/installer/util/browser_distribution.cc +++ b/chrome/installer/util/browser_distribution.cc @@ -63,6 +63,10 @@ std::wstring BrowserDistribution::GetApplicationName() { return L"Chromium"; } +std::wstring BrowserDistribution::GetAppShortCutName() { + return GetApplicationName(); +} + std::wstring BrowserDistribution::GetAlternateApplicationName() { return L"The Internet"; } diff --git a/chrome/installer/util/browser_distribution.h b/chrome/installer/util/browser_distribution.h index 0d33d8f..338371a 100644 --- a/chrome/installer/util/browser_distribution.h +++ b/chrome/installer/util/browser_distribution.h @@ -27,6 +27,8 @@ class BrowserDistribution { virtual std::wstring GetApplicationName(); + virtual std::wstring GetAppShortCutName(); + virtual std::wstring GetAlternateApplicationName(); virtual std::wstring GetInstallSubDir(); diff --git a/chrome/installer/util/google_chrome_sxs_distribution.cc b/chrome/installer/util/google_chrome_sxs_distribution.cc index 446fa24..dbea09c 100644 --- a/chrome/installer/util/google_chrome_sxs_distribution.cc +++ b/chrome/installer/util/google_chrome_sxs_distribution.cc @@ -6,6 +6,7 @@ #include "chrome/installer/util/google_chrome_sxs_distribution.h" +#include "installer_util_strings.h" namespace { @@ -17,6 +18,12 @@ GoogleChromeSxSDistribution::GoogleChromeSxSDistribution() { GoogleChromeDistribution::set_product_guid(kChromeSxSGuid); } +std::wstring GoogleChromeSxSDistribution::GetAppShortCutName() { + const std::wstring& shortcut_name = + installer_util::GetLocalizedString(IDS_SXS_SHORTCUT_NAME_BASE); + return shortcut_name; +} + std::wstring GoogleChromeSxSDistribution::GetInstallSubDir() { return GoogleChromeDistribution::GetInstallSubDir().append( installer_util::kSxSSuffix); diff --git a/chrome/installer/util/google_chrome_sxs_distribution.h b/chrome/installer/util/google_chrome_sxs_distribution.h index 4ab3a9d..b749118 100644 --- a/chrome/installer/util/google_chrome_sxs_distribution.h +++ b/chrome/installer/util/google_chrome_sxs_distribution.h @@ -7,6 +7,7 @@ #include "chrome/installer/util/browser_distribution.h" #include "chrome/installer/util/google_chrome_distribution.h" +#include "chrome/installer/util/l10n_string_util.h" #include "chrome/installer/util/util_constants.h" @@ -18,6 +19,7 @@ // system level install and setting as default browser. class GoogleChromeSxSDistribution : public GoogleChromeDistribution { public: + virtual std::wstring GetAppShortCutName(); virtual std::wstring GetInstallSubDir(); virtual std::wstring GetUninstallRegPath(); diff --git a/chrome/installer/util/prebuild/create_string_rc.py b/chrome/installer/util/prebuild/create_string_rc.py index 5ebff1b..38c0a3e 100755 --- a/chrome/installer/util/prebuild/create_string_rc.py +++ b/chrome/installer/util/prebuild/create_string_rc.py @@ -42,6 +42,7 @@ import FP # in setup.exe's resources. kStringIds = [ 'IDS_PRODUCT_NAME', + 'IDS_SXS_SHORTCUT_NAME', 'IDS_PRODUCT_DESCRIPTION', 'IDS_UNINSTALL_CHROME', 'IDS_ABOUT_VERSION_COMPANY_NAME', diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc index bb6118d..542c73a 100644 --- a/chrome/installer/util/shell_util.cc +++ b/chrome/installer/util/shell_util.cc @@ -511,7 +511,7 @@ std::wstring ShellUtil::GetChromeShellOpenCmd(const std::wstring& chrome_exe) { bool ShellUtil::GetChromeShortcutName(std::wstring* shortcut, bool alternate) { BrowserDistribution* dist = BrowserDistribution::GetDistribution(); shortcut->assign(alternate ? dist->GetAlternateApplicationName() : - dist->GetApplicationName()); + dist->GetAppShortCutName()); shortcut->append(L".lnk"); return true; } |