Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: chrome/installer/setup/uninstall.cc

Issue 8729009: Implement an AutoLaunch experiment for Chrome for certain brand codes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/installer/setup/install.cc ('k') | chrome/installer/util/auto_launch_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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"
12 #include "base/string_number_conversions.h" 12 #include "base/string_number_conversions.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "base/win/registry.h" 15 #include "base/win/registry.h"
16 #include "base/win/scoped_handle.h" 16 #include "base/win/scoped_handle.h"
17 #include "base/win/windows_version.h" 17 #include "base/win/windows_version.h"
18 #include "chrome/common/chrome_constants.h" 18 #include "chrome/common/chrome_constants.h"
19 #include "chrome/common/chrome_paths_internal.h" 19 #include "chrome/common/chrome_paths_internal.h"
20 #include "chrome/common/chrome_result_codes.h" 20 #include "chrome/common/chrome_result_codes.h"
21 #include "chrome/installer/setup/install.h" 21 #include "chrome/installer/setup/install.h"
22 #include "chrome/installer/setup/install_worker.h" 22 #include "chrome/installer/setup/install_worker.h"
23 #include "chrome/installer/setup/setup_constants.h" 23 #include "chrome/installer/setup/setup_constants.h"
24 #include "chrome/installer/setup/setup_util.h" 24 #include "chrome/installer/setup/setup_util.h"
25 #include "chrome/installer/util/auto_launch_util.h"
25 #include "chrome/installer/util/browser_distribution.h" 26 #include "chrome/installer/util/browser_distribution.h"
26 #include "chrome/installer/util/channel_info.h" 27 #include "chrome/installer/util/channel_info.h"
27 #include "chrome/installer/util/delete_after_reboot_helper.h" 28 #include "chrome/installer/util/delete_after_reboot_helper.h"
28 #include "chrome/installer/util/google_update_constants.h" 29 #include "chrome/installer/util/google_update_constants.h"
29 #include "chrome/installer/util/google_update_settings.h" 30 #include "chrome/installer/util/google_update_settings.h"
30 #include "chrome/installer/util/helper.h" 31 #include "chrome/installer/util/helper.h"
31 #include "chrome/installer/util/install_util.h" 32 #include "chrome/installer/util/install_util.h"
32 #include "chrome/installer/util/installation_state.h" 33 #include "chrome/installer/util/installation_state.h"
33 #include "chrome/installer/util/installer_state.h" 34 #include "chrome/installer/util/installer_state.h"
34 #include "chrome/installer/util/logging_installer.h" 35 #include "chrome/installer/util/logging_installer.h"
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 installer::switches::kRegisterChromeBrowserSuffix, suffix); 728 installer::switches::kRegisterChromeBrowserSuffix, suffix);
728 } 729 }
729 DWORD exit_code = installer::UNKNOWN_STATUS; 730 DWORD exit_code = installer::UNKNOWN_STATUS;
730 InstallUtil::ExecuteExeAsAdmin(new_cmd, &exit_code); 731 InstallUtil::ExecuteExeAsAdmin(new_cmd, &exit_code);
731 } 732 }
732 } 733 }
733 734
734 // 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
735 // 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
736 // in case of errors. 737 // in case of errors.
737 if (is_chrome) 738 if (is_chrome) {
738 ClearRlzProductState(); 739 ClearRlzProductState();
739 740
741 if (auto_launch_util::WillLaunchAtLogin(installer_state.target_path()))
742 auto_launch_util::SetWillLaunchAtLogin(false, FilePath());
743 }
744
740 // First delete shortcuts from Start->Programs, Desktop & Quick Launch. 745 // First delete shortcuts from Start->Programs, Desktop & Quick Launch.
741 DeleteChromeShortcuts(installer_state, product); 746 DeleteChromeShortcuts(installer_state, product);
742 747
743 // Delete the registry keys (Uninstall key and Version key). 748 // Delete the registry keys (Uninstall key and Version key).
744 HKEY reg_root = installer_state.root_key(); 749 HKEY reg_root = installer_state.root_key();
745 750
746 // Note that we must retrieve the distribution-specific data before deleting 751 // Note that we must retrieve the distribution-specific data before deleting
747 // product.GetVersionKey(). 752 // product.GetVersionKey().
748 std::wstring distribution_data(browser_dist->GetDistributionData(reg_root)); 753 std::wstring distribution_data(browser_dist->GetDistributionData(reg_root));
749 754
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 898
894 // Try and delete the preserved local state once the post-install 899 // Try and delete the preserved local state once the post-install
895 // operations are complete. 900 // operations are complete.
896 if (!backup_state_file.empty()) 901 if (!backup_state_file.empty())
897 file_util::Delete(backup_state_file, false); 902 file_util::Delete(backup_state_file, false);
898 903
899 return ret; 904 return ret;
900 } 905 }
901 906
902 } // namespace installer 907 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/setup/install.cc ('k') | chrome/installer/util/auto_launch_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698