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

Unified Diff: chrome/installer/setup/uninstall.cc

Issue 14287008: Refactoring installer shortcut deletion; adding dedicated shortcut update feature. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing name_filter; removing general directory operations; renaming 'migrate' to 'retarget'; code… Created 7 years, 8 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/setup/uninstall.cc
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc
index f34de8e5925959c8967aba6b11441bb0c42889cb..f34feadd11ef4cb9475875c35bc1e1a607cbfa57 100644
--- a/chrome/installer/setup/uninstall.cc
+++ b/chrome/installer/setup/uninstall.cc
@@ -340,28 +340,20 @@ void DeleteShortcuts(const InstallerState& installer_state,
ShellUtil::SYSTEM_LEVEL : ShellUtil::CURRENT_USER;
VLOG(1) << "Deleting Desktop shortcut.";
gab 2013/04/30 19:20:33 nit: s/shortcut/shortcuts
huangs 2013/04/30 20:52:10 Done.
- if (!ShellUtil::RemoveShortcut(ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist,
- target_exe, install_level, NULL)) {
+ if (!ShellUtil::RemoveShortcuts(ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist,
+ install_level, target_exe)) {
grt (UTC plus 2) 2013/04/30 19:59:53 fix indentation for all of these
huangs 2013/04/30 20:52:10 Done.
LOG(WARNING) << "Failed to delete Desktop shortcut.";
}
- // Also try to delete the alternate desktop shortcut. It is not sufficient
- // to do so upon failure of the above call as ERROR_FILE_NOT_FOUND on
- // delete is considered success.
- if (!ShellUtil::RemoveShortcut(
- ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist, target_exe, install_level,
- &dist->GetAlternateApplicationName())) {
- LOG(WARNING) << "Failed to delete alternate Desktop shortcut.";
- }
VLOG(1) << "Deleting Quick Launch shortcut.";
gab 2013/04/30 19:20:33 nit: s/shortcut/shortcuts
huangs 2013/04/30 20:52:10 Done.
- if (!ShellUtil::RemoveShortcut(ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH,
- dist, target_exe, install_level, NULL)) {
+ if (!ShellUtil::RemoveShortcuts(ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH,
+ dist, install_level, target_exe)) {
LOG(WARNING) << "Failed to delete Quick Launch shortcut.";
}
VLOG(1) << "Deleting Start Menu shortcuts.";
- if (!ShellUtil::RemoveShortcut(ShellUtil::SHORTCUT_LOCATION_START_MENU, dist,
- target_exe, install_level, NULL)) {
+ if (!ShellUtil::RemoveShortcuts(ShellUtil::SHORTCUT_LOCATION_START_MENU, dist,
gab 2013/04/30 19:20:33 Note to self (and huangs/calamity): this could eas
huangs 2013/04/30 20:52:10 Let's worry about this after my App Launcher thing
+ install_level, target_exe)) {
LOG(WARNING) << "Failed to delete Start Menu shortcuts.";
}
@@ -370,10 +362,14 @@ void DeleteShortcuts(const InstallerState& installer_state,
// it is possible for shortcuts to remain pinned while their parent shortcut
// has been deleted or changed to point to another |target_exe|. Make sure all
// pinned-to-taskbar shortcuts that point to |target_exe| are unpinned.
- ShellUtil::RemoveTaskbarShortcuts(target_exe.value());
+ if (!ShellUtil::RemoveShortcuts(ShellUtil::SHORTCUT_LOCATION_TASKBAR_PINS,
+ dist, ShellUtil::CURRENT_USER, target_exe)) {
gab 2013/04/30 19:20:33 nit: indent
huangs 2013/04/30 20:52:10 Done.
+ LOG_IF(WARNING, base::win::GetVersion() >= base::win::VERSION_WIN7)
+ << "Failed to unpin taskbar shortcuts at user-level.";
+ }
ShellUtil::RemoveStartScreenShortcuts(product.distribution(),
- target_exe.value());
+ target_exe);
}
bool ScheduleParentAndGrandparentForDeletion(const base::FilePath& path) {

Powered by Google App Engine
This is Rietveld 408576698