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, WorkItem::kWow64Default, | 267 reg_root, version_key, KEY_WOW64_32KEY, |
268 google_update::kRegOldVersionField); | 268 google_update::kRegOldVersionField); |
269 install_list->AddDeleteRegValueWorkItem( | 269 install_list->AddDeleteRegValueWorkItem( |
270 reg_root, version_key, WorkItem::kWow64Default, | 270 reg_root, version_key, KEY_WOW64_32KEY, |
271 google_update::kRegCriticalVersionField); | 271 google_update::kRegCriticalVersionField); |
272 install_list->AddDeleteRegValueWorkItem( | 272 install_list->AddDeleteRegValueWorkItem( |
273 reg_root, version_key, WorkItem::kWow64Default, | 273 reg_root, version_key, KEY_WOW64_32KEY, |
274 google_update::kRegRenameCmdField); | 274 google_update::kRegRenameCmdField); |
275 } | 275 } |
276 installer::InstallStatus ret = installer::RENAME_SUCCESSFUL; | 276 installer::InstallStatus ret = installer::RENAME_SUCCESSFUL; |
277 if (!install_list->Do()) { | 277 if (!install_list->Do()) { |
278 LOG(ERROR) << "Renaming of executables failed. Rolling back any changes."; | 278 LOG(ERROR) << "Renaming of executables failed. Rolling back any changes."; |
279 install_list->Rollback(); | 279 install_list->Rollback(); |
280 ret = installer::RENAME_FAILED; | 280 ret = installer::RENAME_FAILED; |
281 } | 281 } |
282 // 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 |
283 // deletion at reboot when this scope closes. | 283 // deletion at reboot when this scope closes. |
(...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1838 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT | 1838 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT |
1839 // 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 |
1840 // never invoked directly by Google Update. | 1840 // never invoked directly by Google Update. |
1841 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1841 return_code = InstallUtil::GetInstallReturnCode(install_status); |
1842 } | 1842 } |
1843 | 1843 |
1844 VLOG(1) << "Installation complete, returning: " << return_code; | 1844 VLOG(1) << "Installation complete, returning: " << return_code; |
1845 | 1845 |
1846 return return_code; | 1846 return return_code; |
1847 } | 1847 } |
OLD | NEW |