Chromium Code Reviews| Index: chrome/installer/util/shell_util.h |
| diff --git a/chrome/installer/util/shell_util.h b/chrome/installer/util/shell_util.h |
| index f13e2bb40d11ff6c3659d23a0a81e6b53b85f621..12fe340591986c888577d66580ecdbefdc27ac7d 100644 |
| --- a/chrome/installer/util/shell_util.h |
| +++ b/chrome/installer/util/shell_util.h |
| @@ -54,7 +54,7 @@ class ShellUtil { |
| SHORTCUT_LOCATION_DESKTOP = SHORTCUT_LOCATION_FIRST, |
| SHORTCUT_LOCATION_QUICK_LAUNCH, |
| SHORTCUT_LOCATION_START_MENU_ROOT, |
| - SHORTCUT_LOCATION_START_MENU_CHROME_DIR, |
| + SHORTCUT_LOCATION_START_MENU_CHROME_DIR_DEPRECATED, // now placed in root |
| SHORTCUT_LOCATION_START_MENU_CHROME_APPS_DIR, |
| SHORTCUT_LOCATION_TASKBAR_PINS, // base::win::VERSION_WIN7 + |
| SHORTCUT_LOCATION_APP_SHORTCUTS, // base::win::VERSION_WIN8 + |
| @@ -311,17 +311,26 @@ class ShellUtil { |
| // Returns true if the current Windows version supports the presence of |
| // shortcuts at |location|. |
| - static bool ShortcutLocationIsSupported(ShellUtil::ShortcutLocation location); |
| + static bool ShortcutLocationIsSupported(ShortcutLocation location); |
| // Sets |path| to the path for a shortcut at the |location| desired for the |
| // given |level| (CURRENT_USER for per-user path and SYSTEM_LEVEL for |
| // all-users path). |
| // Returns false on failure. |
| - static bool GetShortcutPath(ShellUtil::ShortcutLocation location, |
| + static bool GetShortcutPath(ShortcutLocation location, |
| BrowserDistribution* dist, |
| ShellChange level, |
| base::FilePath* path); |
| + // Move an existing shortcut from |old_location| to |new_location| for the |
| + // set |shortcut_level|. If the folder containing |old_location| is then |
| + // empty, it will be removed. |
| + static bool MoveExistingShortcut( |
|
grt (UTC plus 2)
2015/10/20 18:10:30
formatting nit:
static bool MoveExistingShortcut
bcwhite
2015/10/20 18:25:43
Done.
gab
2015/10/20 18:25:59
Sounds like running "git cl format" will fix a few
bcwhite
2015/10/20 19:03:12
Done.
|
| + ShortcutLocation old_location, |
| + ShortcutLocation new_location, |
| + BrowserDistribution* dist, |
| + const ShortcutProperties& properties); |
| + |
| // Updates shortcut in |location| (or creates it if |options| specify |
| // SHELL_SHORTCUT_CREATE_ALWAYS). |
| // |dist| gives the type of browser distribution currently in use. |
| @@ -332,10 +341,10 @@ class ShellUtil { |
| // SHORTCUT_LOCATION_START_MENU_CHROME_DIR, or |
| // SHORTCUT_LOCATION_START_MENU_CHROME_APPS_DIR. |
| static bool CreateOrUpdateShortcut( |
| - ShellUtil::ShortcutLocation location, |
| + ShortcutLocation location, |
| BrowserDistribution* dist, |
| - const ShellUtil::ShortcutProperties& properties, |
| - ShellUtil::ShortcutOperation operation); |
| + const ShortcutProperties& properties, |
| + ShortcutOperation operation); |
| // Returns the string "|icon_path|,|icon_index|" (see, for example, |
| // http://msdn.microsoft.com/library/windows/desktop/dd391573.aspx). |
| @@ -543,7 +552,7 @@ class ShellUtil { |
| // If |location| is a Chrome-specific folder, it will be deleted as well. |
| // Returns true if all shortcuts pointing to |target_exe| are successfully |
| // deleted, including the case where no such shortcuts are found. |
| - static bool RemoveShortcuts(ShellUtil::ShortcutLocation location, |
| + static bool RemoveShortcuts(ShortcutLocation location, |
| BrowserDistribution* dist, |
| ShellChange level, |
| const base::FilePath& target_exe); |
| @@ -557,7 +566,7 @@ class ShellUtil { |
| // Returns true if all updates to matching shortcuts are successful, including |
| // the vacuous case where no matching shortcuts are found. |
| static bool RetargetShortcutsWithArgs( |
| - ShellUtil::ShortcutLocation location, |
| + ShortcutLocation location, |
| BrowserDistribution* dist, |
| ShellChange level, |
| const base::FilePath& old_target_exe, |
| @@ -570,7 +579,7 @@ class ShellUtil { |
| // those shortcuts. This method will abort and return false if |cancel| is |
| // non-NULL and gets set at any point during this call. |
| static bool ShortcutListMaybeRemoveUnknownArgs( |
| - ShellUtil::ShortcutLocation location, |
| + ShortcutLocation location, |
| BrowserDistribution* dist, |
| ShellChange level, |
| const base::FilePath& chrome_exe, |