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 <windows.h> | 9 #include <windows.h> |
10 | 10 |
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1144 // and registry entries. Here we will just make best effort and keep going | 1144 // and registry entries. Here we will just make best effort and keep going |
1145 // in case of errors. | 1145 // in case of errors. |
1146 ClearRlzProductState(); | 1146 ClearRlzProductState(); |
1147 // Delete the key that delegate_execute might make. | 1147 // Delete the key that delegate_execute might make. |
1148 if (base::win::GetVersion() >= base::win::VERSION_WIN8) { | 1148 if (base::win::GetVersion() >= base::win::VERSION_WIN8) { |
1149 InstallUtil::DeleteRegistryKey(HKEY_CURRENT_USER, | 1149 InstallUtil::DeleteRegistryKey(HKEY_CURRENT_USER, |
1150 chrome::kMetroRegistryPath, | 1150 chrome::kMetroRegistryPath, |
1151 WorkItem::kWow64Default); | 1151 WorkItem::kWow64Default); |
1152 } | 1152 } |
1153 | 1153 |
1154 auto_launch_util::DisableAllAutoStartFeatures( | 1154 auto_launch_util::DisableBackgroundStartAtLogin(); |
1155 base::ASCIIToUTF16(chrome::kInitialProfile)); | |
1156 | 1155 |
1157 // If user-level chrome is self-destructing as a result of encountering a | 1156 // If user-level chrome is self-destructing as a result of encountering a |
1158 // system-level chrome, retarget owned non-default shortcuts (app shortcuts, | 1157 // system-level chrome, retarget owned non-default shortcuts (app shortcuts, |
1159 // profile shortcuts, etc.) to the system-level chrome. | 1158 // profile shortcuts, etc.) to the system-level chrome. |
1160 if (cmd_line.HasSwitch(installer::switches::kSelfDestruct) && | 1159 if (cmd_line.HasSwitch(installer::switches::kSelfDestruct) && |
1161 !installer_state.system_install()) { | 1160 !installer_state.system_install()) { |
1162 const base::FilePath system_chrome_path( | 1161 const base::FilePath system_chrome_path( |
1163 GetChromeInstallPath(true, browser_dist). | 1162 GetChromeInstallPath(true, browser_dist). |
1164 Append(installer::kChromeExe)); | 1163 Append(installer::kChromeExe)); |
1165 VLOG(1) << "Retargeting user-generated Chrome shortcuts."; | 1164 VLOG(1) << "Retargeting user-generated Chrome shortcuts."; |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1440 // If we need a reboot to continue, schedule the parent directories for | 1439 // If we need a reboot to continue, schedule the parent directories for |
1441 // deletion unconditionally. If they are not empty, the session manager | 1440 // deletion unconditionally. If they are not empty, the session manager |
1442 // will not delete them on reboot. | 1441 // will not delete them on reboot. |
1443 ScheduleParentAndGrandparentForDeletion(target_path); | 1442 ScheduleParentAndGrandparentForDeletion(target_path); |
1444 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { | 1443 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { |
1445 *uninstall_status = UNINSTALL_FAILED; | 1444 *uninstall_status = UNINSTALL_FAILED; |
1446 } | 1445 } |
1447 } | 1446 } |
1448 | 1447 |
1449 } // namespace installer | 1448 } // namespace installer |
OLD | NEW |