| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <string> | 5 #include <string> |
| 6 #include <windows.h> | 6 #include <windows.h> |
| 7 #include <msi.h> | 7 #include <msi.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 #include <shlobj.h> | 9 #include <shlobj.h> |
| 10 | 10 |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 IDS_UNINSTALL_COMPLETE_BASE).c_str(), | 715 IDS_UNINSTALL_COMPLETE_BASE).c_str(), |
| 716 dist->GetApplicationName().c_str(), | 716 dist->GetApplicationName().c_str(), |
| 717 MB_OK); | 717 MB_OK); |
| 718 } | 718 } |
| 719 } | 719 } |
| 720 | 720 |
| 721 int return_code = 0; | 721 int return_code = 0; |
| 722 // MSI demands that custom actions always return 0 (ERROR_SUCCESS) or it will | 722 // MSI demands that custom actions always return 0 (ERROR_SUCCESS) or it will |
| 723 // rollback the action. If we're uninstalling we want to avoid this, so always | 723 // rollback the action. If we're uninstalling we want to avoid this, so always |
| 724 // report success, squashing any more informative return codes. | 724 // report success, squashing any more informative return codes. |
| 725 if (!(InstallUtil::IsMSIProcess() && | 725 if (!(InstallUtil::IsMSIProcess(system_install) && |
| 726 parsed_command_line.HasSwitch(installer_util::switches::kUninstall))) { | 726 parsed_command_line.HasSwitch(installer_util::switches::kUninstall))) { |
| 727 // Note that we allow the status installer_util::UNINSTALL_REQUIRES_REBOOT | 727 // Note that we allow the status installer_util::UNINSTALL_REQUIRES_REBOOT |
| 728 // to pass through, since this is only returned on uninstall which is never | 728 // to pass through, since this is only returned on uninstall which is never |
| 729 // invoked directly by Google Update. | 729 // invoked directly by Google Update. |
| 730 dist->GetInstallReturnCode(install_status); | 730 dist->GetInstallReturnCode(install_status); |
| 731 } | 731 } |
| 732 | 732 |
| 733 LOG(INFO) << "Installation complete, returning: " << return_code; | 733 LOG(INFO) << "Installation complete, returning: " << return_code; |
| 734 return return_code; | 734 return return_code; |
| 735 } | 735 } |
| OLD | NEW |