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 #include "chrome/installer/setup/setup_main.h" | 5 #include "chrome/installer/setup/setup_main.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <msi.h> | 8 #include <msi.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #include <shlobj.h> | 10 #include <shlobj.h> |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 | 257 |
258 // Add work items to delete the "opv", "cpv", and "cmd" values from all | 258 // Add work items to delete the "opv", "cpv", and "cmd" values from all |
259 // products we're operating on (which including the multi-install binaries). | 259 // products we're operating on (which including the multi-install binaries). |
260 const Products& products = installer_state->products(); | 260 const Products& products = installer_state->products(); |
261 HKEY reg_root = installer_state->root_key(); | 261 HKEY reg_root = installer_state->root_key(); |
262 base::string16 version_key; | 262 base::string16 version_key; |
263 for (Products::const_iterator it = products.begin(); it < products.end(); | 263 for (Products::const_iterator it = products.begin(); it < products.end(); |
264 ++it) { | 264 ++it) { |
265 version_key = (*it)->distribution()->GetVersionKey(); | 265 version_key = (*it)->distribution()->GetVersionKey(); |
266 install_list->AddDeleteRegValueWorkItem( | 266 install_list->AddDeleteRegValueWorkItem( |
267 reg_root, version_key, google_update::kRegOldVersionField); | 267 reg_root, version_key, WorkItem::kWow64Default, |
| 268 google_update::kRegOldVersionField); |
268 install_list->AddDeleteRegValueWorkItem( | 269 install_list->AddDeleteRegValueWorkItem( |
269 reg_root, version_key, google_update::kRegCriticalVersionField); | 270 reg_root, version_key, WorkItem::kWow64Default, |
| 271 google_update::kRegCriticalVersionField); |
270 install_list->AddDeleteRegValueWorkItem( | 272 install_list->AddDeleteRegValueWorkItem( |
271 reg_root, version_key, google_update::kRegRenameCmdField); | 273 reg_root, version_key, WorkItem::kWow64Default, |
| 274 google_update::kRegRenameCmdField); |
272 } | 275 } |
273 installer::InstallStatus ret = installer::RENAME_SUCCESSFUL; | 276 installer::InstallStatus ret = installer::RENAME_SUCCESSFUL; |
274 if (!install_list->Do()) { | 277 if (!install_list->Do()) { |
275 LOG(ERROR) << "Renaming of executables failed. Rolling back any changes."; | 278 LOG(ERROR) << "Renaming of executables failed. Rolling back any changes."; |
276 install_list->Rollback(); | 279 install_list->Rollback(); |
277 ret = installer::RENAME_FAILED; | 280 ret = installer::RENAME_FAILED; |
278 } | 281 } |
279 // temp_path's dtor will take care of deleting or scheduling itself for | 282 // temp_path's dtor will take care of deleting or scheduling itself for |
280 // deletion at reboot when this scope closes. | 283 // deletion at reboot when this scope closes. |
281 VLOG(1) << "Deleting temporary directory " << temp_path.path().value(); | 284 VLOG(1) << "Deleting temporary directory " << temp_path.path().value(); |
(...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1835 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT | 1838 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT |
1836 // to pass through, since this is only returned on uninstall which is | 1839 // to pass through, since this is only returned on uninstall which is |
1837 // never invoked directly by Google Update. | 1840 // never invoked directly by Google Update. |
1838 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1841 return_code = InstallUtil::GetInstallReturnCode(install_status); |
1839 } | 1842 } |
1840 | 1843 |
1841 VLOG(1) << "Installation complete, returning: " << return_code; | 1844 VLOG(1) << "Installation complete, returning: " << return_code; |
1842 | 1845 |
1843 return return_code; | 1846 return return_code; |
1844 } | 1847 } |
OLD | NEW |