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 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1133 InstallUtil::DeleteRegistryKey(HKEY_CURRENT_USER, | 1133 InstallUtil::DeleteRegistryKey(HKEY_CURRENT_USER, |
1134 chrome::kMetroRegistryPath); | 1134 chrome::kMetroRegistryPath); |
1135 } | 1135 } |
1136 | 1136 |
1137 auto_launch_util::DisableAllAutoStartFeatures( | 1137 auto_launch_util::DisableAllAutoStartFeatures( |
1138 ASCIIToUTF16(chrome::kInitialProfile)); | 1138 ASCIIToUTF16(chrome::kInitialProfile)); |
1139 | 1139 |
1140 DeleteShortcuts(installer_state, product, base::FilePath(chrome_exe)); | 1140 DeleteShortcuts(installer_state, product, base::FilePath(chrome_exe)); |
1141 | 1141 |
1142 } else if (product.is_chrome_app_host()) { | 1142 } else if (product.is_chrome_app_host()) { |
1143 // TODO(huangs): Remove this check once we have system-level App Host. | |
1144 DCHECK(!installer_state.system_install()); | |
1145 const base::FilePath app_host_exe( | 1143 const base::FilePath app_host_exe( |
1146 installer_state.target_path().Append(installer::kChromeAppHostExe)); | 1144 installer_state.target_path().Append(installer::kChromeAppHostExe)); |
1147 DeleteShortcuts(installer_state, product, app_host_exe); | 1145 DeleteShortcuts(installer_state, product, app_host_exe); |
1148 } | 1146 } |
1149 | 1147 |
1150 // Delete the registry keys (Uninstall key and Version key). | 1148 // Delete the registry keys (Uninstall key and Version key). |
1151 HKEY reg_root = installer_state.root_key(); | 1149 HKEY reg_root = installer_state.root_key(); |
1152 | 1150 |
1153 // Note that we must retrieve the distribution-specific data before deleting | 1151 // Note that we must retrieve the distribution-specific data before deleting |
1154 // product.GetVersionKey(). | 1152 // product.GetVersionKey(). |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1430 // deletion unconditionally. If they are not empty, the session manager | 1428 // deletion unconditionally. If they are not empty, the session manager |
1431 // will not delete them on reboot. | 1429 // will not delete them on reboot. |
1432 ScheduleParentAndGrandparentForDeletion(target_path); | 1430 ScheduleParentAndGrandparentForDeletion(target_path); |
1433 } else if (DeleteApplicationProductAndVendorDirectories(target_path) == | 1431 } else if (DeleteApplicationProductAndVendorDirectories(target_path) == |
1434 installer::DELETE_FAILED) { | 1432 installer::DELETE_FAILED) { |
1435 *uninstall_status = installer::UNINSTALL_FAILED; | 1433 *uninstall_status = installer::UNINSTALL_FAILED; |
1436 } | 1434 } |
1437 } | 1435 } |
1438 | 1436 |
1439 } // namespace installer | 1437 } // namespace installer |
OLD | NEW |