Chromium Code Reviews| 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 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 756 InstallUtil::ExecuteExeAsAdmin(new_cmd, &exit_code); | 756 InstallUtil::ExecuteExeAsAdmin(new_cmd, &exit_code); |
| 757 } | 757 } |
| 758 } | 758 } |
| 759 | 759 |
| 760 // Chrome is not in use so lets uninstall Chrome by deleting various files | 760 // Chrome is not in use so lets uninstall Chrome by deleting various files |
| 761 // and registry entries. Here we will just make best effort and keep going | 761 // and registry entries. Here we will just make best effort and keep going |
| 762 // in case of errors. | 762 // in case of errors. |
| 763 if (is_chrome) { | 763 if (is_chrome) { |
| 764 ClearRlzProductState(); | 764 ClearRlzProductState(); |
| 765 | 765 |
| 766 if (auto_launch_util::WillLaunchAtLogin( | 766 if (auto_launch_util::WillLaunchAtLoginWithSwitch( |
| 767 installer_state.target_path(), | 767 installer_state.target_path(), |
| 768 ASCIIToUTF16(chrome::kInitialProfile))) { | 768 ASCIIToUTF16(chrome::kInitialProfile), |
|
Andrew T Wilson (Slow)
2012/04/16 22:57:33
Why do we need to call this first? Can't we just c
| |
| 769 auto_launch_util::SetWillLaunchAtLogin( | 769 "")) { |
| 770 false, FilePath(), ASCIIToUTF16(chrome::kInitialProfile)); | 770 auto_launch_util::DisableAllAutostartFeatures(ASCIIToUTF16( |
| 771 chrome::kInitialProfile)); | |
| 771 } | 772 } |
| 772 } | 773 } |
| 773 | 774 |
| 774 // First delete shortcuts from Start->Programs, Desktop & Quick Launch. | 775 // First delete shortcuts from Start->Programs, Desktop & Quick Launch. |
| 775 DeleteChromeShortcuts(installer_state, product); | 776 DeleteChromeShortcuts(installer_state, product); |
| 776 | 777 |
| 777 // Delete the registry keys (Uninstall key and Version key). | 778 // Delete the registry keys (Uninstall key and Version key). |
| 778 HKEY reg_root = installer_state.root_key(); | 779 HKEY reg_root = installer_state.root_key(); |
| 779 | 780 |
| 780 // Note that we must retrieve the distribution-specific data before deleting | 781 // Note that we must retrieve the distribution-specific data before deleting |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 928 | 929 |
| 929 // Try and delete the preserved local state once the post-install | 930 // Try and delete the preserved local state once the post-install |
| 930 // operations are complete. | 931 // operations are complete. |
| 931 if (!backup_state_file.empty()) | 932 if (!backup_state_file.empty()) |
| 932 file_util::Delete(backup_state_file, false); | 933 file_util::Delete(backup_state_file, false); |
| 933 | 934 |
| 934 return ret; | 935 return ret; |
| 935 } | 936 } |
| 936 | 937 |
| 937 } // namespace installer | 938 } // namespace installer |
| OLD | NEW |