| 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 <windows.h> | 5 #include <windows.h> |
| 6 #include <msi.h> | 6 #include <msi.h> |
| 7 #include <shellapi.h> | 7 #include <shellapi.h> |
| 8 #include <shlobj.h> | 8 #include <shlobj.h> |
| 9 | 9 |
| 10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 if (install_path.empty()) { | 581 if (install_path.empty()) { |
| 582 // Give up if we failed to construct the install path. | 582 // Give up if we failed to construct the install path. |
| 583 *status = installer::OS_ERROR; | 583 *status = installer::OS_ERROR; |
| 584 installer_state->WriteInstallerResult(*status, | 584 installer_state->WriteInstallerResult(*status, |
| 585 IDS_INSTALL_OS_ERROR_BASE, | 585 IDS_INSTALL_OS_ERROR_BASE, |
| 586 NULL); | 586 NULL); |
| 587 } else { | 587 } else { |
| 588 *status = installer::EXISTING_VERSION_LAUNCHED; | 588 *status = installer::EXISTING_VERSION_LAUNCHED; |
| 589 FilePath chrome_exe = install_path.Append(installer::kChromeExe); | 589 FilePath chrome_exe = install_path.Append(installer::kChromeExe); |
| 590 CommandLine cmd(chrome_exe); | 590 CommandLine cmd(chrome_exe); |
| 591 cmd.AppendSwitch(switches::kFirstRun); | 591 cmd.AppendSwitch(switches::kForceFirstRun); |
| 592 installer_state->WriteInstallerResult(*status, 0, NULL); | 592 installer_state->WriteInstallerResult(*status, 0, NULL); |
| 593 VLOG(1) << "Launching existing system-level chrome instead."; | 593 VLOG(1) << "Launching existing system-level chrome instead."; |
| 594 base::LaunchProcess(cmd, base::LaunchOptions(), NULL); | 594 base::LaunchProcess(cmd, base::LaunchOptions(), NULL); |
| 595 } | 595 } |
| 596 } else { | 596 } else { |
| 597 // Display an error message for other products. | 597 // Display an error message for other products. |
| 598 *status = installer::SYSTEM_LEVEL_INSTALL_EXISTS; | 598 *status = installer::SYSTEM_LEVEL_INSTALL_EXISTS; |
| 599 installer_state->WriteInstallerResult( | 599 installer_state->WriteInstallerResult( |
| 600 *status, IDS_INSTALL_SYSTEM_LEVEL_EXISTS_BASE, NULL); | 600 *status, IDS_INSTALL_SYSTEM_LEVEL_EXISTS_BASE, NULL); |
| 601 } | 601 } |
| (...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1667 if (!(installer_state.is_msi() && is_uninstall)) | 1667 if (!(installer_state.is_msi() && is_uninstall)) |
| 1668 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT | 1668 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT |
| 1669 // to pass through, since this is only returned on uninstall which is | 1669 // to pass through, since this is only returned on uninstall which is |
| 1670 // never invoked directly by Google Update. | 1670 // never invoked directly by Google Update. |
| 1671 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1671 return_code = InstallUtil::GetInstallReturnCode(install_status); |
| 1672 | 1672 |
| 1673 VLOG(1) << "Installation complete, returning: " << return_code; | 1673 VLOG(1) << "Installation complete, returning: " << return_code; |
| 1674 | 1674 |
| 1675 return return_code; | 1675 return return_code; |
| 1676 } | 1676 } |
| OLD | NEW |