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

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

Powered by Google App Engine
This is Rietveld 408576698