Index: chrome/installer/setup/uninstall.cc |
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc |
index 5c694b41c464a71751437d5e16ff9793970f0c66..eafff6459edfae438eb9da3b7a7ab0e7b79b7bc2 100644 |
--- a/chrome/installer/setup/uninstall.cc |
+++ b/chrome/installer/setup/uninstall.cc |
@@ -256,29 +256,13 @@ void CloseChromeFrameHelperProcess() { |
} |
} |
-// This method deletes Chrome shortcut folder from Windows Start menu. It |
-// checks system_uninstall to see if the shortcut is in all users start menu |
-// or current user start menu. |
-// We try to remove the standard desktop shortcut but if that fails we try |
-// to remove the alternate desktop shortcut. Only one of them should be |
-// present in a given install but at this point we don't know which one. |
-// We remove all start screen secondary tiles by removing the folder Windows |
-// uses to store this installation's tiles. |
-void DeleteChromeShortcuts(const InstallerState& installer_state, |
- const Product& product, |
+// This method deletes shortcut from Windows Start menu, for the given |
+// |install_level|. Either the standard desktop shortcut or the alternate |
+// desktop shortcut are present. We don't know which one is present, so we |
+// delete both. Finally, we delete the quick lauch shortcut. |
+void DeleteShortcutsCommon(ShellUtil::ShellChange install_level, |
+ BrowserDistribution* dist, |
const string16& chrome_exe) { |
- if (!product.is_chrome()) { |
- VLOG(1) << __FUNCTION__ " called for non-CHROME distribution"; |
- return; |
- } |
- |
- BrowserDistribution* dist = product.distribution(); |
- |
- // The per-user shortcut for this user, if present on a system-level install, |
- // has already been deleted in chrome_browser_main_win.cc::DoUninstallTasks(). |
- ShellUtil::ShellChange install_level = installer_state.system_install() ? |
- ShellUtil::SYSTEM_LEVEL : ShellUtil::CURRENT_USER; |
- |
VLOG(1) << "Deleting Desktop shortcut."; |
if (!ShellUtil::RemoveChromeShortcut( |
ShellUtil::SHORTCUT_DESKTOP, dist, chrome_exe, install_level, NULL)) { |
@@ -299,6 +283,28 @@ void DeleteChromeShortcuts(const InstallerState& installer_state, |
NULL)) { |
LOG(WARNING) << "Failed to delete Quick Launch shortcut."; |
} |
+} |
+ |
+// This method deletes Chrome shortcut folder from Windows Start menu. It |
+// checks system_uninstall to see if the shortcut is in all users start menu |
+// or current user start menu. After deleting individual shortcuts, we then |
+// remove all start screen secondary tiles by removing the folder Windows |
+// uses to store this installation's tiles. |
+void DeleteChromeShortcuts(const InstallerState& installer_state, |
+ const Product& product, |
+ const string16& chrome_exe) { |
+ if (!product.is_chrome()) { |
+ VLOG(1) << __FUNCTION__ " called for non-CHROME distribution"; |
+ return; |
+ } |
+ |
+ // The per-user shortcut for this user, if present on a system-level install, |
+ // has already been deleted in chrome_browser_main_win.cc::DoUninstallTasks(). |
+ ShellUtil::ShellChange install_level = installer_state.system_install() ? |
+ ShellUtil::SYSTEM_LEVEL : ShellUtil::CURRENT_USER; |
+ |
+ BrowserDistribution* dist = product.distribution(); |
+ DeleteShortcutsCommon(install_level, dist, chrome_exe); |
VLOG(1) << "Deleting Start Menu shortcuts."; |
if (!ShellUtil::RemoveChromeShortcut( |