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

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, 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/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..2bf42784ddb334354cbb799ab1f0380ff21909bb 100644
--- a/chrome/installer/util/google_chrome_sxs_distribution.cc
+++ b/chrome/installer/util/google_chrome_sxs_distribution.cc
@@ -29,10 +29,20 @@ string16 GoogleChromeSxSDistribution::GetBaseAppName() {
return L"Google Chrome Canary";
}
-string16 GoogleChromeSxSDistribution::GetAppShortCutName() {
- const string16& shortcut_name =
- installer::GetLocalizedString(IDS_SXS_SHORTCUT_NAME_BASE);
- return shortcut_name;
+string16 GoogleChromeSxSDistribution::GetShortcutName(
+ ShortcutType shortcut_type) {
+ switch (shortcut_type) {
grt (UTC plus 2) 2013/07/05 17:27:37 I think it's bad for this to ever return the empty
calamity 2013/07/16 04:05:17 Done.
+ case SHORTCUT_CHROME:
+ return GetBaseAppName();
gab 2013/07/05 14:23:37 Make this installer::GetLocalizedString(IDS_SXS_SH
calamity 2013/07/16 04:05:17 Done.
+ case SHORTCUT_ALTERNATE_CHROME:
+ return L"The Internet";
gab 2013/07/05 14:23:37 Actually, this should just use GoogleChromeDsitrib
calamity 2013/07/16 04:05:17 Done.
+ 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(ShortcutType shortcut_type) {
+ switch (shortcut_type) {
+ case SHORTCUT_CHROME:
+ case SHORTCUT_ALTERNATE_CHROME:
+ return kSxSIconIndex;
+ case SHORTCUT_APP_LAUNCHER:
+ return 5;
+ default:
+ NOTREACHED();
+ return 0;
grt (UTC plus 2) 2013/07/05 17:27:37 this should never return 0, since that would resul
calamity 2013/07/16 04:05:17 Done.
+ }
}
bool GoogleChromeSxSDistribution::GetChromeChannel(string16* channel) {

Powered by Google App Engine
This is Rietveld 408576698