Chromium Code Reviews| 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 path = product.GetUserDataPath().AppendASCII("Default"); |
|
grt (UTC plus 2)
2012/02/01 18:45:15
"Default" -> chrome::kInitialProfile
grt (UTC plus 2)
2012/02/01 18:45:15
nit: path -> profile_path or somesuch?
| |
| 742 auto_launch_util::SetWillLaunchAtLogin(false, FilePath()); | 742 if (auto_launch_util::WillLaunchAtLogin(installer_state.target_path(), |
| 743 path)) { | |
| 744 auto_launch_util::SetWillLaunchAtLogin(false, FilePath(), path); | |
| 745 } | |
| 743 } | 746 } |
| 744 | 747 |
| 745 // First delete shortcuts from Start->Programs, Desktop & Quick Launch. | 748 // First delete shortcuts from Start->Programs, Desktop & Quick Launch. |
| 746 DeleteChromeShortcuts(installer_state, product); | 749 DeleteChromeShortcuts(installer_state, product); |
| 747 | 750 |
| 748 // Delete the registry keys (Uninstall key and Version key). | 751 // Delete the registry keys (Uninstall key and Version key). |
| 749 HKEY reg_root = installer_state.root_key(); | 752 HKEY reg_root = installer_state.root_key(); |
| 750 | 753 |
| 751 // Note that we must retrieve the distribution-specific data before deleting | 754 // Note that we must retrieve the distribution-specific data before deleting |
| 752 // product.GetVersionKey(). | 755 // product.GetVersionKey(). |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 898 | 901 |
| 899 // Try and delete the preserved local state once the post-install | 902 // Try and delete the preserved local state once the post-install |
| 900 // operations are complete. | 903 // operations are complete. |
| 901 if (!backup_state_file.empty()) | 904 if (!backup_state_file.empty()) |
| 902 file_util::Delete(backup_state_file, false); | 905 file_util::Delete(backup_state_file, false); |
| 903 | 906 |
| 904 return ret; | 907 return ret; |
| 905 } | 908 } |
| 906 | 909 |
| 907 } // namespace installer | 910 } // namespace installer |
| OLD | NEW |