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

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, 7 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..76259636d497a8461f7bf64e6fec1c192bf56c57 100644
--- a/chrome/installer/util/google_chrome_sxs_distribution.cc
+++ b/chrome/installer/util/google_chrome_sxs_distribution.cc
@@ -29,10 +29,28 @@ 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;
+BrowserDistribution::ShortcutInfo GoogleChromeSxSDistribution::GetShortcutInfo(
+ ShortcutEnum shortcut_enum) {
+ ShortcutInfo info;
+ switch (shortcut_enum) {
+ case SHORTCUT_CHROME:
+ info.name = GetBaseAppName();
+ info.icon_index = kSxSIconIndex;
+ break;
+ case SHORTCUT_ALTERNATE_CHROME:
+ info.name = L"The Internet";
+ info.icon_index = kSxSIconIndex;
+ break;
+ case SHORTCUT_APP_LAUNCHER:
+ // TODO(calamity): Replace with a localized string.
+ info.name = L"Chrome App Launcher";
gab 2013/05/24 15:01:35 This should be "Canary" not "Google Chrome".
calamity 2013/05/31 00:11:18 Done.
+ info.icon_index = 5;
+ break;
+ default:
+ NOTREACHED();
+ return ShortcutInfo();
+ }
+ return info;
}
string16 GoogleChromeSxSDistribution::GetBaseAppId() {
@@ -53,10 +71,6 @@ bool GoogleChromeSxSDistribution::CanSetAsDefault() {
return false;
}
-int GoogleChromeSxSDistribution::GetIconIndex() {
- return kSxSIconIndex;
-}
-
bool GoogleChromeSxSDistribution::GetChromeChannel(string16* channel) {
*channel = kChannelName;
return true;

Powered by Google App Engine
This is Rietveld 408576698