| OLD | NEW |
| 1 // Copyright (c) 2011 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 "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| 11 #include "base/process_util.h" | 11 #include "base/process_util.h" |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 InstallUtil::ExecuteExeAsAdmin(new_cmd, &exit_code); | 731 InstallUtil::ExecuteExeAsAdmin(new_cmd, &exit_code); |
| 732 } | 732 } |
| 733 } | 733 } |
| 734 | 734 |
| 735 // Chrome is not in use so lets uninstall Chrome by deleting various files | 735 // Chrome is not in use so lets uninstall Chrome by deleting various files |
| 736 // and registry entries. Here we will just make best effort and keep going | 736 // and registry entries. Here we will just make best effort and keep going |
| 737 // in case of errors. | 737 // in case of errors. |
| 738 if (is_chrome) { | 738 if (is_chrome) { |
| 739 ClearRlzProductState(); | 739 ClearRlzProductState(); |
| 740 | 740 |
| 741 if (auto_launch_util::WillLaunchAtLogin(installer_state.target_path())) | 741 FilePath profile_path = |
| 742 auto_launch_util::SetWillLaunchAtLogin(false, FilePath()); | 742 product.GetUserDataPath().AppendASCII(chrome::kInitialProfile); |
| 743 if (auto_launch_util::WillLaunchAtLogin(installer_state.target_path(), |
| 744 profile_path)) { |
| 745 auto_launch_util::SetWillLaunchAtLogin(false, FilePath(), profile_path); |
| 746 } |
| 743 } | 747 } |
| 744 | 748 |
| 745 // First delete shortcuts from Start->Programs, Desktop & Quick Launch. | 749 // First delete shortcuts from Start->Programs, Desktop & Quick Launch. |
| 746 DeleteChromeShortcuts(installer_state, product); | 750 DeleteChromeShortcuts(installer_state, product); |
| 747 | 751 |
| 748 // Delete the registry keys (Uninstall key and Version key). | 752 // Delete the registry keys (Uninstall key and Version key). |
| 749 HKEY reg_root = installer_state.root_key(); | 753 HKEY reg_root = installer_state.root_key(); |
| 750 | 754 |
| 751 // Note that we must retrieve the distribution-specific data before deleting | 755 // Note that we must retrieve the distribution-specific data before deleting |
| 752 // product.GetVersionKey(). | 756 // product.GetVersionKey(). |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 | 902 |
| 899 // Try and delete the preserved local state once the post-install | 903 // Try and delete the preserved local state once the post-install |
| 900 // operations are complete. | 904 // operations are complete. |
| 901 if (!backup_state_file.empty()) | 905 if (!backup_state_file.empty()) |
| 902 file_util::Delete(backup_state_file, false); | 906 file_util::Delete(backup_state_file, false); |
| 903 | 907 |
| 904 return ret; | 908 return ret; |
| 905 } | 909 } |
| 906 | 910 |
| 907 } // namespace installer | 911 } // namespace installer |
| OLD | NEW |