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

Unified Diff: chrome/installer/util/google_chrome_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_distribution.cc
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc
index 14ce3099cb256db0f94a856e65056e112cbb2a4d..d717855f760ef5a1783b17b03f2ba0f8a685bc82 100644
--- a/chrome/installer/util/google_chrome_distribution.cc
+++ b/chrome/installer/util/google_chrome_distribution.cc
@@ -125,16 +125,19 @@ 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::GetAlternateApplicationName() {
- const string16& alt_product_name =
- installer::GetLocalizedString(IDS_OEM_MAIN_SHORTCUT_NAME_BASE);
- return alt_product_name;
+string16 GoogleChromeDistribution::GetShortcutName(ShortcutEnum shortcut_enum) {
+ switch (shortcut_enum) {
+ case SHORTCUT_CHROME:
+ return installer::GetLocalizedString(IDS_PRODUCT_NAME_BASE);
+ case SHORTCUT_ALTERNATE_CHROME:
+ return installer::GetLocalizedString(IDS_OEM_MAIN_SHORTCUT_NAME_BASE);
+ case SHORTCUT_APP_LAUNCHER:
+ // TODO(calamity): Replace with a localized string.
+ return L"Chrome App Launcher";
+ default:
+ NOTREACHED();
+ return string16();
+ }
}
string16 GoogleChromeDistribution::GetBaseAppId() {
@@ -278,3 +281,16 @@ bool GoogleChromeDistribution::ShouldSetExperimentLabels() {
bool GoogleChromeDistribution::HasUserExperiments() {
return true;
}
+
+int GoogleChromeDistribution::GetIconIndex(ShortcutEnum shortcut_enum) {
gab 2013/06/18 19:50:29 Please put this below GoogleChromeDistribution::Ge
calamity 2013/06/27 01:27:44 Done.
+ switch (shortcut_enum) {
+ case SHORTCUT_CHROME:
+ case SHORTCUT_ALTERNATE_CHROME:
+ return 0;
+ case SHORTCUT_APP_LAUNCHER:
+ return 6;
+ default:
+ NOTREACHED();
+ return 0;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698