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

Unified Diff: chrome/installer/util/browser_distribution.h

Issue 15255004: Refactor of BrowserDistribution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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
« no previous file with comments | « chrome/installer/setup/uninstall.cc ('k') | chrome/installer/util/browser_distribution.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/browser_distribution.h
diff --git a/chrome/installer/util/browser_distribution.h b/chrome/installer/util/browser_distribution.h
index ca67c0bc1b5d40d7b382c0dd8280cb43a92276b0..b308c04fecddd8223de6ef11c97ae9dcd7f031a3 100644
--- a/chrome/installer/util/browser_distribution.h
+++ b/chrome/installer/util/browser_distribution.h
@@ -29,6 +29,17 @@ class BrowserDistribution {
NUM_TYPES
};
+ enum ShortcutType {
+ SHORTCUT_CHROME,
+ SHORTCUT_CHROME_ALTERNATE,
+ SHORTCUT_APP_LAUNCHER
+ };
+
+ enum Subfolder {
+ SUBFOLDER_CHROME,
+ // TODO(calamity): add SUBFOLDER_APPS when refactoring chrome app dir code.
+ };
+
virtual ~BrowserDistribution() {}
static BrowserDistribution* GetDistribution();
@@ -53,10 +64,24 @@ class BrowserDistribution {
// at run-time.
virtual string16 GetBaseAppName();
- // Returns the localized name of the program.
- virtual string16 GetAppShortCutName();
+ // Returns the localized display name of this distribution.
+ virtual string16 GetDisplayName();
- virtual string16 GetAlternateApplicationName();
+ // Returns the localized name of the shortcut identified by |shortcut_type|
+ // for this distribution.
+ virtual string16 GetShortcutName(ShortcutType shortcut_type);
+
+ // Returns the index of the icon for the product identified by
+ // |shortcut_type|, inside the file specified by GetIconFilename().
+ virtual int GetIconIndex(ShortcutType shortcut_type);
+
+ // Returns the executable filename (not path) that contains the product icon.
+ virtual string16 GetIconFilename();
+
+ // Returns the localized name of the subfolder in the Start Menu identified by
+ // |subfolder_type| that this distribution should create shortcuts in. For
+ // SUBFOLDER_CHROME this returns GetShortcutName(SHORTCUT_CHROME).
+ virtual string16 GetStartMenuShortcutSubfolder(Subfolder subfolder_type);
// Returns the unsuffixed appid of this program.
// The AppUserModelId is a property of Windows programs.
@@ -96,13 +121,6 @@ class BrowserDistribution {
virtual bool CanCreateDesktopShortcuts();
- // Returns the executable filename (not path) that contains the product icon.
- virtual string16 GetIconFilename();
-
- // Returns the index of the icon for the product, inside the file specified by
- // GetIconFilename().
- virtual int GetIconIndex();
-
virtual bool GetChromeChannel(string16* channel);
// Returns true if this distribution includes a DelegateExecute verb handler,
« no previous file with comments | « chrome/installer/setup/uninstall.cc ('k') | chrome/installer/util/browser_distribution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698