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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 reg_root, | 421 reg_root, |
422 version_key, | 422 version_key, |
423 KEY_WOW64_32KEY, | 423 KEY_WOW64_32KEY, |
424 google_update::kRegCriticalVersionField); | 424 google_update::kRegCriticalVersionField); |
425 install_list->AddDeleteRegValueWorkItem(reg_root, | 425 install_list->AddDeleteRegValueWorkItem(reg_root, |
426 version_key, | 426 version_key, |
427 KEY_WOW64_32KEY, | 427 KEY_WOW64_32KEY, |
428 google_update::kRegRenameCmdField); | 428 google_update::kRegRenameCmdField); |
429 } | 429 } |
430 // old_chrome.exe is still in use in most cases, so ignore failures here. | 430 // old_chrome.exe is still in use in most cases, so ignore failures here. |
431 // Make sure this is the last item in the list because it cannot be rolled | 431 install_list->AddDeleteTreeWorkItem(chrome_old_exe, temp_path.path()) |
432 // back. | 432 ->set_best_effort(true); |
433 install_list->AddDeleteTreeWorkItem(chrome_old_exe, temp_path.path())-> | |
434 set_ignore_failure(true); | |
435 | 433 |
436 installer::InstallStatus ret = installer::RENAME_SUCCESSFUL; | 434 installer::InstallStatus ret = installer::RENAME_SUCCESSFUL; |
437 if (!install_list->Do()) { | 435 if (!install_list->Do()) { |
438 LOG(ERROR) << "Renaming of executables failed. Rolling back any changes."; | 436 LOG(ERROR) << "Renaming of executables failed. Rolling back any changes."; |
439 install_list->Rollback(); | 437 install_list->Rollback(); |
440 ret = installer::RENAME_FAILED; | 438 ret = installer::RENAME_FAILED; |
441 } | 439 } |
442 // temp_path's dtor will take care of deleting or scheduling itself for | 440 // temp_path's dtor will take care of deleting or scheduling itself for |
443 // deletion at reboot when this scope closes. | 441 // deletion at reboot when this scope closes. |
444 VLOG(1) << "Deleting temporary directory " << temp_path.path().value(); | 442 VLOG(1) << "Deleting temporary directory " << temp_path.path().value(); |
(...skipping 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1848 // to pass through, since this is only returned on uninstall which is | 1846 // to pass through, since this is only returned on uninstall which is |
1849 // never invoked directly by Google Update. | 1847 // never invoked directly by Google Update. |
1850 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1848 return_code = InstallUtil::GetInstallReturnCode(install_status); |
1851 } | 1849 } |
1852 | 1850 |
1853 installer::EndPersistentHistogramStorage(installer_state.target_path()); | 1851 installer::EndPersistentHistogramStorage(installer_state.target_path()); |
1854 VLOG(1) << "Installation complete, returning: " << return_code; | 1852 VLOG(1) << "Installation complete, returning: " << return_code; |
1855 | 1853 |
1856 return return_code; | 1854 return return_code; |
1857 } | 1855 } |
OLD | NEW |