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::InstallationState& machine_state, | |
grt (UTC plus 2)
2012/08/30 04:15:25
unused
huangs
2012/08/30 17:13:07
Done.
| |
133 const installer::Product& product) { | |
134 scoped_ptr<WorkItemList> work_item_list( | |
135 WorkItem::CreateNoRollbackWorkItemList()); | |
136 AddOsUpgradeWorkItems(installer_state, NULL, NULL, product, | |
137 work_item_list.get()); | |
138 if (!work_item_list->Do()) | |
139 LOG(ERROR) << "Failed to update on-os-upgrade command."; | |
grt (UTC plus 2)
2012/08/30 04:15:25
should "update" be "remove"?
huangs
2012/08/30 17:13:07
Done.
| |
140 } | |
141 | |
130 // Adds or removes the quick-enable-cf command to the binaries' version key in | 142 // Adds or removes the quick-enable-cf command to the binaries' version key in |
131 // the registry as needed. | 143 // the registry as needed. |
132 void ProcessQuickEnableWorkItems( | 144 void ProcessQuickEnableWorkItems( |
133 const installer::InstallerState& installer_state, | 145 const installer::InstallerState& installer_state, |
134 const installer::InstallationState& machine_state) { | 146 const installer::InstallationState& machine_state) { |
135 scoped_ptr<WorkItemList> work_item_list( | 147 scoped_ptr<WorkItemList> work_item_list( |
136 WorkItem::CreateNoRollbackWorkItemList()); | 148 WorkItem::CreateNoRollbackWorkItemList()); |
137 | 149 |
138 AddQuickEnableChromeFrameWorkItems(installer_state, machine_state, NULL, NULL, | 150 AddQuickEnableChromeFrameWorkItems(installer_state, machine_state, NULL, NULL, |
139 work_item_list.get()); | 151 work_item_list.get()); |
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1059 if (installer_state.system_install() || | 1071 if (installer_state.system_install() || |
1060 (remove_all && | 1072 (remove_all && |
1061 ShellUtil::QuickIsChromeRegisteredInHKLM( | 1073 ShellUtil::QuickIsChromeRegisteredInHKLM( |
1062 browser_dist, chrome_exe, suffix))) { | 1074 browser_dist, chrome_exe, suffix))) { |
1063 DeleteChromeRegistrationKeys(browser_dist, HKEY_LOCAL_MACHINE, suffix, | 1075 DeleteChromeRegistrationKeys(browser_dist, HKEY_LOCAL_MACHINE, suffix, |
1064 installer_state.target_path(), &ret); | 1076 installer_state.target_path(), &ret); |
1065 } | 1077 } |
1066 | 1078 |
1067 ProcessDelegateExecuteWorkItems(installer_state, product); | 1079 ProcessDelegateExecuteWorkItems(installer_state, product); |
1068 | 1080 |
1081 ProcessOnOsUpgradeWorkItems(installer_state, original_state, product); | |
1082 | |
1069 // TODO(gab): This is only disabled for M22 as the shortcut CL using Active | 1083 // TODO(gab): This is only disabled for M22 as the shortcut CL using Active |
1070 // Setup will not make it in M22. | 1084 // Setup will not make it in M22. |
1071 #if 0 | 1085 #if 0 |
1072 UninstallActiveSetupEntries(installer_state, product); | 1086 UninstallActiveSetupEntries(installer_state, product); |
1073 #endif | 1087 #endif |
1074 } | 1088 } |
1075 | 1089 |
1076 if (product.is_chrome_frame()) { | 1090 if (product.is_chrome_frame()) { |
1077 ProcessChromeFrameWorkItems(original_state, installer_state, setup_path, | 1091 ProcessChromeFrameWorkItems(original_state, installer_state, setup_path, |
1078 product); | 1092 product); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1180 | 1194 |
1181 // Try and delete the preserved local state once the post-install | 1195 // Try and delete the preserved local state once the post-install |
1182 // operations are complete. | 1196 // operations are complete. |
1183 if (!backup_state_file.empty()) | 1197 if (!backup_state_file.empty()) |
1184 file_util::Delete(backup_state_file, false); | 1198 file_util::Delete(backup_state_file, false); |
1185 | 1199 |
1186 return ret; | 1200 return ret; |
1187 } | 1201 } |
1188 | 1202 |
1189 } // namespace installer | 1203 } // namespace installer |
OLD | NEW |