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

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: 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/browser_distribution.h
diff --git a/chrome/installer/util/browser_distribution.h b/chrome/installer/util/browser_distribution.h
index d1459ff04fcb6ec0b7e3c8e6d8dd33c44a90701e..12b3bf8112976e54406a741bdd22a09eac66bb82 100644
--- a/chrome/installer/util/browser_distribution.h
+++ b/chrome/installer/util/browser_distribution.h
@@ -29,6 +29,23 @@ class BrowserDistribution {
NUM_TYPES
};
+ enum ShortcutEnum {
+ SHORTCUT_CHROME,
+ SHORTCUT_ALTERNATE_CHROME,
+ SHORTCUT_APP_LAUNCHER
+ };
+
+ enum SubfolderEnum {
+ SUBFOLDER_CHROME
+ // TODO(calamity): Add SUBFOLDER_APPS.
+ };
+
+ struct ShortcutInfo {
+ string16 name;
+ string16 icon_file;
+ int icon_index;
+ };
+
virtual ~BrowserDistribution() {}
static BrowserDistribution* GetDistribution();
@@ -53,10 +70,16 @@ class BrowserDistribution {
// at run-time.
virtual string16 GetBaseAppName();
- // Returns the localized name of the program.
- virtual string16 GetAppShortCutName();
+ // Returns the display name of the distribution. This is the same as the
+ // Chrome shortcut name.
+ virtual string16 GetDisplayName();
+
+ // Returns the ShortcutInfo for this distribution.
+ virtual ShortcutInfo GetShortcutInfo(ShortcutEnum shortcut_enum);
- virtual string16 GetAlternateApplicationName();
+ // Returns the name of the subfolder in the Start Menu that this distribution
+ // should create shortcuts in.
+ virtual string16 GetStartMenuShortcutSubfolder(SubfolderEnum subfolder_enum);
// Returns the unsuffixed appid of this program.
// The AppUserModelId is a property of Windows programs.
@@ -96,13 +119,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,

Powered by Google App Engine
This is Rietveld 408576698