| 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 #include <stddef.h> | 10 #include <stddef.h> |
| (...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 DeleteShortcuts(installer_state, product, chrome_exe); | 896 DeleteShortcuts(installer_state, product, chrome_exe); |
| 897 | 897 |
| 898 // Delete the registry keys (Uninstall key and Version key). | 898 // Delete the registry keys (Uninstall key and Version key). |
| 899 HKEY reg_root = installer_state.root_key(); | 899 HKEY reg_root = installer_state.root_key(); |
| 900 | 900 |
| 901 // Note that we must retrieve the distribution-specific data before deleting | 901 // Note that we must retrieve the distribution-specific data before deleting |
| 902 // product.GetVersionKey(). | 902 // product.GetVersionKey(). |
| 903 base::string16 distribution_data(browser_dist->GetDistributionData(reg_root)); | 903 base::string16 distribution_data(browser_dist->GetDistributionData(reg_root)); |
| 904 | 904 |
| 905 // Remove Control Panel uninstall link. | 905 // Remove Control Panel uninstall link. |
| 906 if (product.ShouldCreateUninstallEntry()) { | 906 InstallUtil::DeleteRegistryKey(reg_root, browser_dist->GetUninstallRegPath(), |
| 907 InstallUtil::DeleteRegistryKey( | 907 KEY_WOW64_32KEY); |
| 908 reg_root, browser_dist->GetUninstallRegPath(), KEY_WOW64_32KEY); | |
| 909 } | |
| 910 | 908 |
| 911 // Remove Omaha product key. | 909 // Remove Omaha product key. |
| 912 InstallUtil::DeleteRegistryKey( | 910 InstallUtil::DeleteRegistryKey( |
| 913 reg_root, browser_dist->GetVersionKey(), KEY_WOW64_32KEY); | 911 reg_root, browser_dist->GetVersionKey(), KEY_WOW64_32KEY); |
| 914 | 912 |
| 915 // Also try to delete the MSI value in the ClientState key (it might not be | 913 // Also try to delete the MSI value in the ClientState key (it might not be |
| 916 // there). This is due to a Google Update behaviour where an uninstall and a | 914 // there). This is due to a Google Update behaviour where an uninstall and a |
| 917 // rapid reinstall might result in stale values from the old ClientState key | 915 // rapid reinstall might result in stale values from the old ClientState key |
| 918 // being picked up on reinstall. | 916 // being picked up on reinstall. |
| 919 product.SetMsiMarker(installer_state.system_install(), false); | 917 product.SetMsiMarker(installer_state.system_install(), false); |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1107 // If we need a reboot to continue, schedule the parent directories for | 1105 // If we need a reboot to continue, schedule the parent directories for |
| 1108 // deletion unconditionally. If they are not empty, the session manager | 1106 // deletion unconditionally. If they are not empty, the session manager |
| 1109 // will not delete them on reboot. | 1107 // will not delete them on reboot. |
| 1110 ScheduleParentAndGrandparentForDeletion(target_path); | 1108 ScheduleParentAndGrandparentForDeletion(target_path); |
| 1111 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { | 1109 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { |
| 1112 *uninstall_status = UNINSTALL_FAILED; | 1110 *uninstall_status = UNINSTALL_FAILED; |
| 1113 } | 1111 } |
| 1114 } | 1112 } |
| 1115 | 1113 |
| 1116 } // namespace installer | 1114 } // namespace installer |
| OLD | NEW |