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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 << " is somehow already set to the desired new value of " | 120 << " is somehow already set to the desired new value of " |
121 << channel_info.value(); | 121 << channel_info.value(); |
122 } | 122 } |
123 } | 123 } |
124 | 124 |
125 bool success = update_list->Do(); | 125 bool success = update_list->Do(); |
126 LOG_IF(ERROR, !success) << "Failed updating channel values."; | 126 LOG_IF(ERROR, !success) << "Failed updating channel values."; |
127 } | 127 } |
128 } | 128 } |
129 | 129 |
| 130 void ProcessOnOsUpgradeWorkItems( |
| 131 const installer::InstallerState& installer_state, |
| 132 const installer::Product& product) { |
| 133 scoped_ptr<WorkItemList> work_item_list( |
| 134 WorkItem::CreateNoRollbackWorkItemList()); |
| 135 AddOsUpgradeWorkItems(installer_state, NULL, product, work_item_list.get()); |
| 136 if (!work_item_list->Do()) |
| 137 LOG(ERROR) << "Failed to remove on-os-upgrade command."; |
| 138 } |
| 139 |
130 // Adds or removes the quick-enable-cf command to the binaries' version key in | 140 // Adds or removes the quick-enable-cf command to the binaries' version key in |
131 // the registry as needed. | 141 // the registry as needed. |
132 void ProcessQuickEnableWorkItems( | 142 void ProcessQuickEnableWorkItems( |
133 const installer::InstallerState& installer_state, | 143 const installer::InstallerState& installer_state, |
134 const installer::InstallationState& machine_state) { | 144 const installer::InstallationState& machine_state) { |
135 scoped_ptr<WorkItemList> work_item_list( | 145 scoped_ptr<WorkItemList> work_item_list( |
136 WorkItem::CreateNoRollbackWorkItemList()); | 146 WorkItem::CreateNoRollbackWorkItemList()); |
137 | 147 |
138 AddQuickEnableChromeFrameWorkItems(installer_state, machine_state, NULL, NULL, | 148 AddQuickEnableChromeFrameWorkItems(installer_state, machine_state, NULL, NULL, |
139 work_item_list.get()); | 149 work_item_list.get()); |
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1059 if (installer_state.system_install() || | 1069 if (installer_state.system_install() || |
1060 (remove_all && | 1070 (remove_all && |
1061 ShellUtil::QuickIsChromeRegisteredInHKLM( | 1071 ShellUtil::QuickIsChromeRegisteredInHKLM( |
1062 browser_dist, chrome_exe, suffix))) { | 1072 browser_dist, chrome_exe, suffix))) { |
1063 DeleteChromeRegistrationKeys(browser_dist, HKEY_LOCAL_MACHINE, suffix, | 1073 DeleteChromeRegistrationKeys(browser_dist, HKEY_LOCAL_MACHINE, suffix, |
1064 installer_state.target_path(), &ret); | 1074 installer_state.target_path(), &ret); |
1065 } | 1075 } |
1066 | 1076 |
1067 ProcessDelegateExecuteWorkItems(installer_state, product); | 1077 ProcessDelegateExecuteWorkItems(installer_state, product); |
1068 | 1078 |
| 1079 ProcessOnOsUpgradeWorkItems(installer_state, product); |
| 1080 |
1069 // TODO(gab): This is only disabled for M22 as the shortcut CL using Active | 1081 // TODO(gab): This is only disabled for M22 as the shortcut CL using Active |
1070 // Setup will not make it in M22. | 1082 // Setup will not make it in M22. |
1071 #if 0 | 1083 #if 0 |
1072 UninstallActiveSetupEntries(installer_state, product); | 1084 UninstallActiveSetupEntries(installer_state, product); |
1073 #endif | 1085 #endif |
1074 } | 1086 } |
1075 | 1087 |
1076 if (product.is_chrome_frame()) { | 1088 if (product.is_chrome_frame()) { |
1077 ProcessChromeFrameWorkItems(original_state, installer_state, setup_path, | 1089 ProcessChromeFrameWorkItems(original_state, installer_state, setup_path, |
1078 product); | 1090 product); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1180 | 1192 |
1181 // Try and delete the preserved local state once the post-install | 1193 // Try and delete the preserved local state once the post-install |
1182 // operations are complete. | 1194 // operations are complete. |
1183 if (!backup_state_file.empty()) | 1195 if (!backup_state_file.empty()) |
1184 file_util::Delete(backup_state_file, false); | 1196 file_util::Delete(backup_state_file, false); |
1185 | 1197 |
1186 return ret; | 1198 return ret; |
1187 } | 1199 } |
1188 | 1200 |
1189 } // namespace installer | 1201 } // namespace installer |
OLD | NEW |