Index: chrome/installer/util/google_chrome_distribution.cc |
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc |
index c7a7c3e410077a350e5cb2cf3fc1a02c298e49d9..174d8b4d27ceb7e5e77fc425854014b5cda246a4 100644 |
--- a/chrome/installer/util/google_chrome_distribution.cc |
+++ b/chrome/installer/util/google_chrome_distribution.cc |
@@ -37,6 +37,7 @@ const wchar_t kChromeGuid[] = L"{8A69D345-D564-463c-AFF1-A69D9E530F96}"; |
const wchar_t kBrowserAppId[] = L"Chrome"; |
const wchar_t kCommandExecuteImplUuid[] = |
L"{5C65F4B0-3651-4514-B207-D10CB699B14B}"; |
+const int kAppLauncherIconIndex = 5; |
// Substitute the locale parameter in uninstall URL with whatever |
// Google Update tells us is the locale. In case we fail to find |
@@ -125,16 +126,29 @@ string16 GoogleChromeDistribution::GetBaseAppName() { |
return L"Google Chrome"; |
} |
-string16 GoogleChromeDistribution::GetAppShortCutName() { |
- const string16& app_shortcut_name = |
- installer::GetLocalizedString(IDS_PRODUCT_NAME_BASE); |
- return app_shortcut_name; |
+string16 GoogleChromeDistribution::GetShortcutName(ShortcutType shortcut_type) { |
+ int string_id = IDS_PRODUCT_NAME_BASE; |
+ switch (shortcut_type) { |
+ case SHORTCUT_CHROME_ALTERNATE: |
+ string_id = IDS_OEM_MAIN_SHORTCUT_NAME_BASE; |
+ break; |
+ case SHORTCUT_APP_LAUNCHER: |
+ string_id = IDS_APP_LIST_SHORTCUT_NAME_BASE; |
+ break; |
+ default: |
+ DCHECK_EQ(shortcut_type, SHORTCUT_CHROME); |
+ break; |
+ } |
+ return installer::GetLocalizedString(string_id); |
} |
-string16 GoogleChromeDistribution::GetAlternateApplicationName() { |
- const string16& alt_product_name = |
- installer::GetLocalizedString(IDS_OEM_MAIN_SHORTCUT_NAME_BASE); |
- return alt_product_name; |
+int GoogleChromeDistribution::GetIconIndex(ShortcutType shortcut_type) { |
+ // The Google Chrome App Launcher icon is index 5; see chrome_exe.rc. |
grt (UTC plus 2)
2013/07/16 19:38:44
please move this comment to the definition of kApp
calamity
2013/07/18 07:56:14
Done.
|
+ if (shortcut_type == SHORTCUT_APP_LAUNCHER) |
+ return kAppLauncherIconIndex; |
+ DCHECK(shortcut_type == SHORTCUT_CHROME || |
+ shortcut_type == SHORTCUT_CHROME_ALTERNATE) << shortcut_type; |
+ return 0; |
} |
string16 GoogleChromeDistribution::GetBaseAppId() { |