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, | 705 const FilePath& setup_path, |
gab
2012/04/25 05:18:29
|setup_path| is now unused.
grt (UTC plus 2)
2012/04/25 13:05:11
Good catch. Done.
| |
707 const Product& product) { | 706 const Product& product) { |
708 scoped_ptr<WorkItemList> item_list(WorkItem::CreateNoRollbackWorkItemList()); | 707 scoped_ptr<WorkItemList> item_list(WorkItem::CreateNoRollbackWorkItemList()); |
709 AddDelegateExecuteWorkItems(original_state, installer_state, setup_path, | 708 AddDelegateExecuteWorkItems(installer_state, FilePath(), Version(), product, |
gab
2012/04/25 05:18:29
I don't like having to create empty FilePath and V
grt (UTC plus 2)
2012/04/25 13:05:11
For the most part, pointers are used for out/inout
| |
710 Version(), product, item_list.get()); | 709 item_list.get()); |
711 return item_list->Do(); | 710 return item_list->Do(); |
712 } | 711 } |
713 | 712 |
714 bool ProcessChromeFrameWorkItems(const InstallationState& original_state, | 713 bool ProcessChromeFrameWorkItems(const InstallationState& original_state, |
715 const InstallerState& installer_state, | 714 const InstallerState& installer_state, |
716 const FilePath& setup_path, | 715 const FilePath& setup_path, |
717 const Product& product) { | 716 const Product& product) { |
718 if (!product.is_chrome_frame()) | 717 if (!product.is_chrome_frame()) |
719 return false; | 718 return false; |
720 | 719 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
823 // self-destruct following the installation of system-level Chrome (because | 822 // self-destruct following the installation of system-level Chrome (because |
824 // the system-level Chrome owns the HKLM registration now), and 2) this user | 823 // the system-level Chrome owns the HKLM registration now), and 2) this user |
825 // had made Chrome their default browser. | 824 // had made Chrome their default browser. |
826 if (installer_state.system_install() || | 825 if (installer_state.system_install() || |
827 (remove_all && | 826 (remove_all && |
828 (!suffix.empty() || CurrentUserHasDefaultBrowser(installer_state)))) { | 827 (!suffix.empty() || CurrentUserHasDefaultBrowser(installer_state)))) { |
829 DeleteChromeRegistrationKeys(product.distribution(), HKEY_LOCAL_MACHINE, | 828 DeleteChromeRegistrationKeys(product.distribution(), HKEY_LOCAL_MACHINE, |
830 suffix, installer_state.target_path(), &ret); | 829 suffix, installer_state.target_path(), &ret); |
831 } | 830 } |
832 | 831 |
833 ProcessDelegateExecuteWorkItems(original_state, installer_state, setup_path, | 832 ProcessDelegateExecuteWorkItems(installer_state, setup_path, product); |
834 product); | |
835 | 833 |
836 if (!is_chrome) { | 834 if (!is_chrome) { |
837 ProcessChromeFrameWorkItems(original_state, installer_state, setup_path, | 835 ProcessChromeFrameWorkItems(original_state, installer_state, setup_path, |
838 product); | 836 product); |
839 } | 837 } |
840 | 838 |
841 if (installer_state.is_multi_install()) | 839 if (installer_state.is_multi_install()) |
842 ProcessGoogleUpdateItems(original_state, installer_state, product); | 840 ProcessGoogleUpdateItems(original_state, installer_state, product); |
843 | 841 |
844 ProcessQuickEnableWorkItems(installer_state, original_state); | 842 ProcessQuickEnableWorkItems(installer_state, original_state); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
955 | 953 |
956 // Try and delete the preserved local state once the post-install | 954 // Try and delete the preserved local state once the post-install |
957 // operations are complete. | 955 // operations are complete. |
958 if (!backup_state_file.empty()) | 956 if (!backup_state_file.empty()) |
959 file_util::Delete(backup_state_file, false); | 957 file_util::Delete(backup_state_file, false); |
960 | 958 |
961 return ret; | 959 return ret; |
962 } | 960 } |
963 | 961 |
964 } // namespace installer | 962 } // namespace installer |
OLD | NEW |