Index: chrome/installer/util/shell_util.h |
diff --git a/chrome/installer/util/shell_util.h b/chrome/installer/util/shell_util.h |
index bfdb9b953ecfeec05bd2c918e40e8096246a7b16..4427739f02a6edad3d61910b2223dab2cfc6198f 100644 |
--- a/chrome/installer/util/shell_util.h |
+++ b/chrome/installer/util/shell_util.h |
@@ -44,6 +44,8 @@ class ShellUtil { |
SHORTCUT_LOCATION_DESKTOP, |
SHORTCUT_LOCATION_QUICK_LAUNCH, |
SHORTCUT_LOCATION_START_MENU, |
+ SHORTCUT_LOCATION_TASKBAR_PINS, // base::win::VERSION_WIN7 + |
+ SHORTCUT_LOCATION_APP_SHORTCUTS, // base::win::VERSION_WIN8 + |
}; |
enum ShortcutOperation { |
@@ -498,33 +500,39 @@ class ShellUtil { |
bool elevate_if_not_admin); |
// Removes installed shortcut(s) at |location|. |
+ // |level|: CURRENT_USER to remove the per-user shortcut, or SYSTEM_LEVEL to |
+ // remove the all-users shortcut. |
// |target_exe|: Shortcut target exe; shortcuts will only be deleted when |
// their target is |target_exe|. |
- // |level|: CURRENT_USER to remove the per-user shortcut and SYSTEM_LEVEL to |
- // remove the all-users shortcut. |
- // |shortcut_name|: If non-null, remove the shortcut named |shortcut_name| at |
- // location; otherwise remove all shortcuts to |target_exe| at |location|. |
// If |location| is SHORTCUT_LOCATION_START_MENU, the shortcut folder specific |
// to |dist| is deleted. |
// Also attempts to unpin the removed shortcut(s) from the taskbar. |
// Returns true if the shortcut(s) were successfully deleted (or there were |
// none at |location| pointing to |target_exe|). |
- static bool RemoveShortcut(ShellUtil::ShortcutLocation location, |
- BrowserDistribution* dist, |
- const base::FilePath& target_exe, |
- ShellChange level, |
- const string16* shortcut_name); |
- |
- // Enumerates all shortcuts pinned to the taskbar and deletes those pointing |
- // to |target_exe|. |
- // base::win::TaskbarUnpinShortcutLink() should be prefered, but this is |
- // useful on uninstall as the parent shortcut of a pin might no longer exist |
- // (thus making it impossible to unpin it via that API). |
- static void RemoveTaskbarShortcuts(const string16& target_exe); |
- |
- // This will remove all secondary tiles from the start screen for |dist|. |
+ static bool RemoveShortcuts(ShellUtil::ShortcutLocation location, |
+ BrowserDistribution* dist, |
+ ShellChange level, |
+ const base::FilePath& target_exe); |
+ |
+ // Remove all secondary tiles with target set to |target_exe| from the |
+ // start screen for |dist|. |
static void RemoveStartScreenShortcuts(BrowserDistribution* dist, |
- const string16& target_exe); |
+ const base::FilePath& target_exe); |
+ |
+ // Traverses through installed shortcut(s) in a similar manner as |
+ // RemoveShortcuts(). Update each matched shortcut to |old_target_exe|, |
+ // to point to points to |new_target_exe|. |
gab
2013/04/30 19:20:33
"to point to points to"?! :)
huangs
2013/04/30 20:52:10
"We must go deeper". Fixed. :)
|
+ static bool RetargetShortcuts(ShellUtil::ShortcutLocation location, |
+ BrowserDistribution* dist, |
+ ShellChange level, |
+ const base::FilePath& old_target_exe, |
+ const base::FilePath& new_target_exe); |
+ |
+ // Similar to RemoveStartScreenShortcuts(), but performs retargeting. |
+ static void RetargetStartScreenShortcuts( |
+ BrowserDistribution* dist, |
+ const base::FilePath& old_target_exe, |
+ const base::FilePath& new_target_exe); |
// Sets |suffix| to the base 32 encoding of the md5 hash of this user's sid |
// preceded by a dot. |