Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: chrome/installer/setup/uninstall.cc

Issue 10823437: Callback flow to register Chrome and update shortcuts after OS upgrade to Windows 8 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactoring; renamed OnOsUpgrade() to HandleOsUpgradeForBrowser(). Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698