| OLD | NEW |
| 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 Loading... |
| 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 | |
| 317 ShellUtil::RemoveChromeStartScreenShortcuts(product.distribution(), | 310 ShellUtil::RemoveChromeStartScreenShortcuts(product.distribution(), |
| 318 chrome_exe); | 311 chrome_exe); |
| 319 } | 312 } |
| 320 | 313 |
| 321 bool ScheduleParentAndGrandparentForDeletion(const FilePath& path) { | 314 bool ScheduleParentAndGrandparentForDeletion(const FilePath& path) { |
| 322 FilePath parent_dir = path.DirName(); | 315 FilePath parent_dir = path.DirName(); |
| 323 bool ret = ScheduleFileSystemEntityForDeletion(parent_dir.value().c_str()); | 316 bool ret = ScheduleFileSystemEntityForDeletion(parent_dir.value().c_str()); |
| 324 if (!ret) { | 317 if (!ret) { |
| 325 LOG(ERROR) << "Failed to schedule parent dir for deletion: " | 318 LOG(ERROR) << "Failed to schedule parent dir for deletion: " |
| 326 << parent_dir.value(); | 319 << parent_dir.value(); |
| (...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1272 | 1265 |
| 1273 // Try and delete the preserved local state once the post-install | 1266 // Try and delete the preserved local state once the post-install |
| 1274 // operations are complete. | 1267 // operations are complete. |
| 1275 if (!backup_state_file.empty()) | 1268 if (!backup_state_file.empty()) |
| 1276 file_util::Delete(backup_state_file, false); | 1269 file_util::Delete(backup_state_file, false); |
| 1277 | 1270 |
| 1278 return ret; | 1271 return ret; |
| 1279 } | 1272 } |
| 1280 | 1273 |
| 1281 } // namespace installer | 1274 } // namespace installer |
| OLD | NEW |