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

Unified Diff: chrome/installer/util/google_chrome_sxs_distribution.cc

Issue 15255004: Refactor of BrowserDistribution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rework Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/installer/util/google_chrome_sxs_distribution.cc
diff --git a/chrome/installer/util/google_chrome_sxs_distribution.cc b/chrome/installer/util/google_chrome_sxs_distribution.cc
index 5224a8cfef6a47566c57bd631ae2254afc59f6d0..a088d6aeff15356b7a661695acc4e10b2e5a6b30 100644
--- a/chrome/installer/util/google_chrome_sxs_distribution.cc
+++ b/chrome/installer/util/google_chrome_sxs_distribution.cc
@@ -26,13 +26,23 @@ GoogleChromeSxSDistribution::GoogleChromeSxSDistribution()
}
string16 GoogleChromeSxSDistribution::GetBaseAppName() {
- return L"Google Chrome Canary";
+ return installer::GetLocalizedString(IDS_SXS_SHORTCUT_NAME_BASE);
gab 2013/06/27 11:49:43 GetBaseAppName() is sometimes used as a registry v
calamity 2013/07/05 09:00:29 Done.
}
-string16 GoogleChromeSxSDistribution::GetAppShortCutName() {
- const string16& shortcut_name =
- installer::GetLocalizedString(IDS_SXS_SHORTCUT_NAME_BASE);
- return shortcut_name;
+string16 GoogleChromeSxSDistribution::GetShortcutName(
+ ShortcutEnum shortcut_enum) {
+ switch (shortcut_enum) {
+ case SHORTCUT_CHROME:
+ return GetBaseAppName();
+ case SHORTCUT_ALTERNATE_CHROME:
+ return L"The Internet";
+ case SHORTCUT_APP_LAUNCHER:
+ // TODO(calamity): Replace with a localized string.
+ return L"Chrome App Launcher Canary";
+ default:
+ NOTREACHED();
+ return string16();
+ }
}
string16 GoogleChromeSxSDistribution::GetBaseAppId() {
@@ -53,8 +63,17 @@ bool GoogleChromeSxSDistribution::CanSetAsDefault() {
return false;
}
-int GoogleChromeSxSDistribution::GetIconIndex() {
- return kSxSIconIndex;
+int GoogleChromeSxSDistribution::GetIconIndex(ShortcutEnum shortcut_enum) {
+ switch (shortcut_enum) {
+ case SHORTCUT_CHROME:
+ case SHORTCUT_ALTERNATE_CHROME:
+ return kSxSIconIndex;
+ case SHORTCUT_APP_LAUNCHER:
+ return 5;
+ default:
+ NOTREACHED();
+ return 0;
+ }
}
bool GoogleChromeSxSDistribution::GetChromeChannel(string16* channel) {

Powered by Google App Engine
This is Rietveld 408576698