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 #include <stddef.h> | 10 #include <stddef.h> |
(...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1214 ProcessGoogleUpdateItems(original_state, installer_state, product); | 1214 ProcessGoogleUpdateItems(original_state, installer_state, product); |
1215 | 1215 |
1216 // Get the state of the installed product (if any) | 1216 // Get the state of the installed product (if any) |
1217 const ProductState* product_state = | 1217 const ProductState* product_state = |
1218 original_state.GetProductState(installer_state.system_install(), | 1218 original_state.GetProductState(installer_state.system_install(), |
1219 browser_dist->GetType()); | 1219 browser_dist->GetType()); |
1220 | 1220 |
1221 // Delete shared registry keys as well (these require admin rights) if | 1221 // Delete shared registry keys as well (these require admin rights) if |
1222 // remove_all option is specified. | 1222 // remove_all option is specified. |
1223 if (remove_all) { | 1223 if (remove_all) { |
1224 if (!InstallUtil::IsChromeSxSProcess() && is_chrome) { | 1224 if (is_chrome && installer_state.system_install()) { |
1225 // Delete media player registry key that exists only in HKLM. | 1225 // Delete media player registry key that exists only in HKLM. |
1226 // We don't delete this key in SxS uninstall or Chrome Frame uninstall | |
1227 // as we never set the key for those products. | |
1228 base::string16 reg_path(installer::kMediaPlayerRegPath); | 1226 base::string16 reg_path(installer::kMediaPlayerRegPath); |
1229 reg_path.push_back(base::FilePath::kSeparators[0]); | 1227 reg_path.push_back(base::FilePath::kSeparators[0]); |
1230 reg_path.append(installer::kChromeExe); | 1228 reg_path.append(installer::kChromeExe); |
1231 InstallUtil::DeleteRegistryKey(HKEY_LOCAL_MACHINE, reg_path, | 1229 InstallUtil::DeleteRegistryKey(HKEY_LOCAL_MACHINE, reg_path, |
1232 WorkItem::kWow64Default); | 1230 WorkItem::kWow64Default); |
1233 } | 1231 } |
1234 | 1232 |
1235 // Unregister any dll servers that we may have registered for this | 1233 // Unregister any dll servers that we may have registered for this |
1236 // product. | 1234 // product. |
1237 if (product_state) { | 1235 if (product_state) { |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1373 // If we need a reboot to continue, schedule the parent directories for | 1371 // If we need a reboot to continue, schedule the parent directories for |
1374 // deletion unconditionally. If they are not empty, the session manager | 1372 // deletion unconditionally. If they are not empty, the session manager |
1375 // will not delete them on reboot. | 1373 // will not delete them on reboot. |
1376 ScheduleParentAndGrandparentForDeletion(target_path); | 1374 ScheduleParentAndGrandparentForDeletion(target_path); |
1377 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { | 1375 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { |
1378 *uninstall_status = UNINSTALL_FAILED; | 1376 *uninstall_status = UNINSTALL_FAILED; |
1379 } | 1377 } |
1380 } | 1378 } |
1381 | 1379 |
1382 } // namespace installer | 1380 } // namespace installer |
OLD | NEW |