| 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 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 InstallUtil::ExecuteExeAsAdmin(new_cmd, &exit_code); | 770 InstallUtil::ExecuteExeAsAdmin(new_cmd, &exit_code); |
| 771 } | 771 } |
| 772 } | 772 } |
| 773 | 773 |
| 774 // Chrome is not in use so lets uninstall Chrome by deleting various files | 774 // Chrome is not in use so lets uninstall Chrome by deleting various files |
| 775 // and registry entries. Here we will just make best effort and keep going | 775 // and registry entries. Here we will just make best effort and keep going |
| 776 // in case of errors. | 776 // in case of errors. |
| 777 if (is_chrome) { | 777 if (is_chrome) { |
| 778 ClearRlzProductState(); | 778 ClearRlzProductState(); |
| 779 | 779 |
| 780 if (auto_launch_util::WillLaunchAtLogin( | 780 auto_launch_util::DisableAllAutoStartFeatures( |
| 781 installer_state.target_path(), | 781 ASCIIToUTF16(chrome::kInitialProfile)); |
| 782 ASCIIToUTF16(chrome::kInitialProfile))) { | |
| 783 auto_launch_util::SetWillLaunchAtLogin( | |
| 784 false, FilePath(), ASCIIToUTF16(chrome::kInitialProfile)); | |
| 785 } | |
| 786 } | 782 } |
| 787 | 783 |
| 788 // First delete shortcuts from Start->Programs, Desktop & Quick Launch. | 784 // First delete shortcuts from Start->Programs, Desktop & Quick Launch. |
| 789 DeleteChromeShortcuts(installer_state, product); | 785 DeleteChromeShortcuts(installer_state, product); |
| 790 | 786 |
| 791 // Delete the registry keys (Uninstall key and Version key). | 787 // Delete the registry keys (Uninstall key and Version key). |
| 792 HKEY reg_root = installer_state.root_key(); | 788 HKEY reg_root = installer_state.root_key(); |
| 793 | 789 |
| 794 // Note that we must retrieve the distribution-specific data before deleting | 790 // Note that we must retrieve the distribution-specific data before deleting |
| 795 // product.GetVersionKey(). | 791 // product.GetVersionKey(). |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 | 941 |
| 946 // Try and delete the preserved local state once the post-install | 942 // Try and delete the preserved local state once the post-install |
| 947 // operations are complete. | 943 // operations are complete. |
| 948 if (!backup_state_file.empty()) | 944 if (!backup_state_file.empty()) |
| 949 file_util::Delete(backup_state_file, false); | 945 file_util::Delete(backup_state_file, false); |
| 950 | 946 |
| 951 return ret; | 947 return ret; |
| 952 } | 948 } |
| 953 | 949 |
| 954 } // namespace installer | 950 } // namespace installer |
| OLD | NEW |