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

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, 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/browser_distribution.h
diff --git a/chrome/installer/util/browser_distribution.h b/chrome/installer/util/browser_distribution.h
index ca67c0bc1b5d40d7b382c0dd8280cb43a92276b0..5fbe5f55937fd1fd29f2888dd92667ebd129b3e9 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_ALTERNATE_CHROME,
grt (UTC plus 2) 2013/07/05 17:27:37 I prefer SHORTCUT_CHROME_ALTERNATE for this since
gab 2013/07/08 12:59:02 Suggestion sgtm, please use SHORTCUT_CHROME_ALTERN
huangs 2013/07/08 19:43:57 (Optional) please consider changing SHORTCUT_CHROM
gab 2013/07/08 20:20:32 This is easily mitigated by a simple regex though
huangs 2013/07/09 15:02:53 Sounds good.
calamity 2013/07/16 04:05:17 Done.
+ 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,23 @@ class BrowserDistribution {
// at run-time.
virtual string16 GetBaseAppName();
- // Returns the localized name of the program.
- virtual string16 GetAppShortCutName();
+ // Returns the display name of this distribution.
gab 2013/07/05 14:23:37 s/display name/localized display name to be expli
calamity 2013/07/16 04:05:17 Done.
+ virtual string16 GetDisplayName();
+
+ // Returns the name of the shortcut identified by |shortcut_type| for this
gab 2013/07/05 14:23:37 s/name/localized name (same idea as above)
calamity 2013/07/16 04:05:17 Done.
+ // 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();
- virtual string16 GetAlternateApplicationName();
+ // Returns the name of the subfolder in the Start Menu identified by
gab 2013/07/05 14:23:37 s/name/localized name (same idea as above)
calamity 2013/07/16 04:05:17 Done.
+ // |subfolder_type| that this distribution should create shortcuts in.
grt (UTC plus 2) 2013/07/05 17:27:37 Please add to this comment that this returns GetSh
gab 2013/07/08 12:59:02 I don't see why you say that subclasses of BD assu
grt (UTC plus 2) 2013/07/08 15:15:50 Exactly. GoogleChromeDistribution and GoogleChrome
calamity 2013/07/16 04:05:17 Done.
+ virtual string16 GetStartMenuShortcutSubfolder(Subfolder subfolder_type);
// Returns the unsuffixed appid of this program.
// The AppUserModelId is a property of Windows programs.
@@ -96,13 +120,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,
@@ -130,6 +147,8 @@ class BrowserDistribution {
static BrowserDistribution* GetOrCreateBrowserDistribution(
BrowserDistribution** dist);
+ static const char* kDefaultAlternateChromeShortcutName;
grt (UTC plus 2) 2013/07/05 17:27:37 This appears to be unused. Remove it?
calamity 2013/07/16 04:05:17 Done.
+
const Type type_;
private:

Powered by Google App Engine
This is Rietveld 408576698