| 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 <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 ext_association.append(L"\\"); | 694 ext_association.append(L"\\"); |
| 695 ext_association.append(chrome::kExtensionFileExtension); | 695 ext_association.append(chrome::kExtensionFileExtension); |
| 696 InstallUtil::DeleteRegistryKey(roots[i], ext_association); | 696 InstallUtil::DeleteRegistryKey(roots[i], ext_association); |
| 697 } | 697 } |
| 698 } | 698 } |
| 699 | 699 |
| 700 // Builds and executes a work item list to remove DelegateExecute verb handler | 700 // Builds and executes a work item list to remove DelegateExecute verb handler |
| 701 // work items for |product|. This will be a noop for products whose | 701 // work items for |product|. This will be a noop for products whose |
| 702 // corresponding BrowserDistribution implementations do not publish | 702 // corresponding BrowserDistribution implementations do not publish |
| 703 // DelegateExecute data via an implementation of GetDelegateExecuteHandlerData. | 703 // DelegateExecute data via an implementation of GetDelegateExecuteHandlerData. |
| 704 bool ProcessDelegateExecuteWorkItems(const InstallationState& original_state, | 704 bool ProcessDelegateExecuteWorkItems(const InstallerState& installer_state, |
| 705 const InstallerState& installer_state, | |
| 706 const FilePath& setup_path, | |
| 707 const Product& product) { | 705 const Product& product) { |
| 708 scoped_ptr<WorkItemList> item_list(WorkItem::CreateNoRollbackWorkItemList()); | 706 scoped_ptr<WorkItemList> item_list(WorkItem::CreateNoRollbackWorkItemList()); |
| 709 AddDelegateExecuteWorkItems(original_state, installer_state, setup_path, | 707 AddDelegateExecuteWorkItems(installer_state, FilePath(), Version(), product, |
| 710 Version(), product, item_list.get()); | 708 item_list.get()); |
| 711 return item_list->Do(); | 709 return item_list->Do(); |
| 712 } | 710 } |
| 713 | 711 |
| 714 bool ProcessChromeFrameWorkItems(const InstallationState& original_state, | 712 bool ProcessChromeFrameWorkItems(const InstallationState& original_state, |
| 715 const InstallerState& installer_state, | 713 const InstallerState& installer_state, |
| 716 const FilePath& setup_path, | 714 const FilePath& setup_path, |
| 717 const Product& product) { | 715 const Product& product) { |
| 718 if (!product.is_chrome_frame()) | 716 if (!product.is_chrome_frame()) |
| 719 return false; | 717 return false; |
| 720 | 718 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 // self-destruct following the installation of system-level Chrome (because | 821 // self-destruct following the installation of system-level Chrome (because |
| 824 // the system-level Chrome owns the HKLM registration now), and 2) this user | 822 // the system-level Chrome owns the HKLM registration now), and 2) this user |
| 825 // had made Chrome their default browser. | 823 // had made Chrome their default browser. |
| 826 if (installer_state.system_install() || | 824 if (installer_state.system_install() || |
| 827 (remove_all && | 825 (remove_all && |
| 828 (!suffix.empty() || CurrentUserHasDefaultBrowser(installer_state)))) { | 826 (!suffix.empty() || CurrentUserHasDefaultBrowser(installer_state)))) { |
| 829 DeleteChromeRegistrationKeys(product.distribution(), HKEY_LOCAL_MACHINE, | 827 DeleteChromeRegistrationKeys(product.distribution(), HKEY_LOCAL_MACHINE, |
| 830 suffix, installer_state.target_path(), &ret); | 828 suffix, installer_state.target_path(), &ret); |
| 831 } | 829 } |
| 832 | 830 |
| 833 ProcessDelegateExecuteWorkItems(original_state, installer_state, setup_path, | 831 ProcessDelegateExecuteWorkItems(installer_state, product); |
| 834 product); | |
| 835 | 832 |
| 836 if (!is_chrome) { | 833 if (!is_chrome) { |
| 837 ProcessChromeFrameWorkItems(original_state, installer_state, setup_path, | 834 ProcessChromeFrameWorkItems(original_state, installer_state, setup_path, |
| 838 product); | 835 product); |
| 839 } | 836 } |
| 840 | 837 |
| 841 if (installer_state.is_multi_install()) | 838 if (installer_state.is_multi_install()) |
| 842 ProcessGoogleUpdateItems(original_state, installer_state, product); | 839 ProcessGoogleUpdateItems(original_state, installer_state, product); |
| 843 | 840 |
| 844 ProcessQuickEnableWorkItems(installer_state, original_state); | 841 ProcessQuickEnableWorkItems(installer_state, original_state); |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 955 | 952 |
| 956 // Try and delete the preserved local state once the post-install | 953 // Try and delete the preserved local state once the post-install |
| 957 // operations are complete. | 954 // operations are complete. |
| 958 if (!backup_state_file.empty()) | 955 if (!backup_state_file.empty()) |
| 959 file_util::Delete(backup_state_file, false); | 956 file_util::Delete(backup_state_file, false); |
| 960 | 957 |
| 961 return ret; | 958 return ret; |
| 962 } | 959 } |
| 963 | 960 |
| 964 } // namespace installer | 961 } // namespace installer |
| OLD | NEW |