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

Side by Side Diff: chrome/installer/setup/uninstall.cc

Issue 11361015: Introduce RemoveChromeTaskbarShortcuts() to delete all pinned-to-taskbar shortcuts owned by the uni… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comment in uninstall.cc Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/shell_integration_win.cc ('k') | chrome/installer/util/shell_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This file defines the methods useful for uninstalling Chrome. 5 // This file defines the methods useful for uninstalling Chrome.
6 6
7 #include "chrome/installer/setup/uninstall.h" 7 #include "chrome/installer/setup/uninstall.h"
8 8
9 #include <windows.h> 9 #include <windows.h>
10 10
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 LOG(WARNING) << "Failed to delete Quick Launch shortcut."; 300 LOG(WARNING) << "Failed to delete Quick Launch shortcut.";
301 } 301 }
302 302
303 VLOG(1) << "Deleting Start Menu shortcuts."; 303 VLOG(1) << "Deleting Start Menu shortcuts.";
304 if (!ShellUtil::RemoveChromeShortcut( 304 if (!ShellUtil::RemoveChromeShortcut(
305 ShellUtil::SHORTCUT_START_MENU, dist, chrome_exe, install_level, 305 ShellUtil::SHORTCUT_START_MENU, dist, chrome_exe, install_level,
306 NULL)) { 306 NULL)) {
307 LOG(WARNING) << "Failed to delete Start Menu shortcuts."; 307 LOG(WARNING) << "Failed to delete Start Menu shortcuts.";
308 } 308 }
309 309
310 // Although the shortcut removal calls above will unpin their shortcut if they
311 // result in a deletion (i.e. shortcut existed and pointed to |chrome_exe|),
312 // it is possible for shortcuts to remain pinned while their parent shortcut
313 // has been deleted or changed to point to another |chrome_exe|. Make sure all
314 // pinned-to-taskbar shortcuts that point to |chrome_exe| are unpinned.
315 ShellUtil::RemoveChromeTaskbarShortcuts(chrome_exe);
316
310 ShellUtil::RemoveChromeStartScreenShortcuts(product.distribution(), 317 ShellUtil::RemoveChromeStartScreenShortcuts(product.distribution(),
311 chrome_exe); 318 chrome_exe);
312 } 319 }
313 320
314 bool ScheduleParentAndGrandparentForDeletion(const FilePath& path) { 321 bool ScheduleParentAndGrandparentForDeletion(const FilePath& path) {
315 FilePath parent_dir = path.DirName(); 322 FilePath parent_dir = path.DirName();
316 bool ret = ScheduleFileSystemEntityForDeletion(parent_dir.value().c_str()); 323 bool ret = ScheduleFileSystemEntityForDeletion(parent_dir.value().c_str());
317 if (!ret) { 324 if (!ret) {
318 LOG(ERROR) << "Failed to schedule parent dir for deletion: " 325 LOG(ERROR) << "Failed to schedule parent dir for deletion: "
319 << parent_dir.value(); 326 << parent_dir.value();
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 1272
1266 // Try and delete the preserved local state once the post-install 1273 // Try and delete the preserved local state once the post-install
1267 // operations are complete. 1274 // operations are complete.
1268 if (!backup_state_file.empty()) 1275 if (!backup_state_file.empty())
1269 file_util::Delete(backup_state_file, false); 1276 file_util::Delete(backup_state_file, false);
1270 1277
1271 return ret; 1278 return ret;
1272 } 1279 }
1273 1280
1274 } // namespace installer 1281 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/browser/shell_integration_win.cc ('k') | chrome/installer/util/shell_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698