summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chrome_browser_main_win.cc
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-03 01:23:32 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-03 01:23:32 +0000
commitf5ae5d0791262a3a221c63ca5ade1de2ab216691 (patch)
treecaa23eedf6b8f6448bfddc0428655473aee5f883 /chrome/browser/chrome_browser_main_win.cc
parent887c3567525779fa4944a15d8e65fb8f8a669f65 (diff)
downloadchromium_src-f5ae5d0791262a3a221c63ca5ade1de2ab216691.zip
chromium_src-f5ae5d0791262a3a221c63ca5ade1de2ab216691.tar.gz
chromium_src-f5ae5d0791262a3a221c63ca5ade1de2ab216691.tar.bz2
Revert 174893 - Windows: Remove desktop profile shortcuts (and any others pointing to the exe) on uninstall.
BUG=146636 TEST=Uninstalling Chrome removes any present profile shortcuts on the desktop. Review URL: https://chromiumcodereview.appspot.com/11693010 TBR=asvitkine@chromium.org Review URL: https://codereview.chromium.org/11748010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174908 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chrome_browser_main_win.cc')
-rw-r--r--chrome/browser/chrome_browser_main_win.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/browser/chrome_browser_main_win.cc b/chrome/browser/chrome_browser_main_win.cc
index b76a20a..67850ba 100644
--- a/chrome/browser/chrome_browser_main_win.cc
+++ b/chrome/browser/chrome_browser_main_win.cc
@@ -135,6 +135,9 @@ int DoUninstallTasks(bool chrome_still_running) {
VLOG(1) << "Executing uninstall actions";
if (!first_run::RemoveSentinel())
VLOG(1) << "Failed to delete sentinel file.";
+ // We want to remove user level shortcuts and we only care about the ones
+ // created by us and not by the installer so |alternate| is false.
+ BrowserDistribution* dist = BrowserDistribution::GetDistribution();
FilePath chrome_exe;
if (PathService::Get(base::FILE_EXE, &chrome_exe)) {
ShellUtil::ShortcutLocation user_shortcut_locations[] = {
@@ -142,15 +145,15 @@ int DoUninstallTasks(bool chrome_still_running) {
ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH,
ShellUtil::SHORTCUT_LOCATION_START_MENU,
};
- BrowserDistribution* dist = BrowserDistribution::GetDistribution();
for (size_t i = 0; i < arraysize(user_shortcut_locations); ++i) {
- if (!ShellUtil::RemoveShortcut(user_shortcut_locations[i], dist,
- chrome_exe, ShellUtil::CURRENT_USER,
- NULL)) {
+ if (!ShellUtil::RemoveShortcut(
+ user_shortcut_locations[i], dist, chrome_exe.value(),
+ ShellUtil::CURRENT_USER, NULL)) {
VLOG(1) << "Failed to delete shortcut at location "
<< user_shortcut_locations[i];
}
}
+ // TODO(rlp): Cleanup profiles shortcuts.
} else {
NOTREACHED();
}