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 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 | 981 |
982 RemoveBlacklistState(); | 982 RemoveBlacklistState(); |
983 | 983 |
984 // Notify the shell that associations have changed since Chrome was likely | 984 // Notify the shell that associations have changed since Chrome was likely |
985 // unregistered. | 985 // unregistered. |
986 SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL); | 986 SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL); |
987 } | 987 } |
988 | 988 |
989 // Get the state of the installed product (if any) | 989 // Get the state of the installed product (if any) |
990 const ProductState* product_state = | 990 const ProductState* product_state = |
991 original_state.GetProductState(installer_state.system_install(), | 991 original_state.GetProductState(installer_state.system_install()); |
992 browser_dist->GetType()); | |
993 | 992 |
994 // Remove the event log provider registration as we are going to delete | 993 // Remove the event log provider registration as we are going to delete |
995 // the file which serves the resources anyways. | 994 // the file which serves the resources anyways. |
996 DeRegisterEventLogProvider(); | 995 DeRegisterEventLogProvider(); |
997 | 996 |
998 // Delete shared registry keys as well (these require admin rights) if | 997 // Delete shared registry keys as well (these require admin rights) if |
999 // remove_all option is specified. | 998 // remove_all option is specified. |
1000 if (remove_all) { | 999 if (remove_all) { |
1001 if (!InstallUtil::IsChromeSxSProcess()) { | 1000 if (!InstallUtil::IsChromeSxSProcess()) { |
1002 // Delete media player registry key that exists only in HKLM. We don't | 1001 // Delete media player registry key that exists only in HKLM. We don't |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1108 // If we need a reboot to continue, schedule the parent directories for | 1107 // If we need a reboot to continue, schedule the parent directories for |
1109 // deletion unconditionally. If they are not empty, the session manager | 1108 // deletion unconditionally. If they are not empty, the session manager |
1110 // will not delete them on reboot. | 1109 // will not delete them on reboot. |
1111 ScheduleParentAndGrandparentForDeletion(target_path); | 1110 ScheduleParentAndGrandparentForDeletion(target_path); |
1112 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { | 1111 } else if (DeleteChromeDirectoriesIfEmpty(target_path) == DELETE_FAILED) { |
1113 *uninstall_status = UNINSTALL_FAILED; | 1112 *uninstall_status = UNINSTALL_FAILED; |
1114 } | 1113 } |
1115 } | 1114 } |
1116 | 1115 |
1117 } // namespace installer | 1116 } // namespace installer |
OLD | NEW |