Chromium Code Reviews| Index: chrome/installer/setup/uninstall.cc |
| diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc |
| index f34de8e5925959c8967aba6b11441bb0c42889cb..858b3516af07661f3fc4550d49139716b168cad9 100644 |
| --- a/chrome/installer/setup/uninstall.cc |
| +++ b/chrome/installer/setup/uninstall.cc |
| @@ -341,27 +341,19 @@ void DeleteShortcuts(const InstallerState& installer_state, |
| VLOG(1) << "Deleting Desktop shortcut."; |
| if (!ShellUtil::RemoveShortcut(ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist, |
| - target_exe, install_level, NULL)) { |
| + install_level, target_exe)) { |
| 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."; |
| if (!ShellUtil::RemoveShortcut(ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH, |
| - dist, target_exe, install_level, NULL)) { |
| + 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)) { |
| + 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::RemoveShortcut(ShellUtil::SHORTCUT_LOCATION_TASKBAR_PINS, |
| + dist, ShellUtil::CURRENT_USER, target_exe)) { |
| + if (base::win::GetVersion() >= base::win::VERSION_WIN7) |
|
grt (UTC plus 2)
2013/04/30 14:38:07
LOG_IF(WARNING, base::win::GetVersion() >= base::w
huangs
2013/04/30 15:58:38
Done.
|
| + LOG(WARNING) << "Failed to unpin taskbar shortcuts at user-level."; |
| + } |
| ShellUtil::RemoveStartScreenShortcuts(product.distribution(), |
| - target_exe.value()); |
| + target_exe); |
| } |
| bool ScheduleParentAndGrandparentForDeletion(const base::FilePath& path) { |