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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 *status = installer::EXISTING_VERSION_LAUNCHED; | 574 *status = installer::EXISTING_VERSION_LAUNCHED; |
575 base::FilePath chrome_exe = | 575 base::FilePath chrome_exe = |
576 install_path.Append(installer::kChromeExe); | 576 install_path.Append(installer::kChromeExe); |
577 CommandLine cmd(chrome_exe); | 577 CommandLine cmd(chrome_exe); |
578 cmd.AppendSwitch(switches::kForceFirstRun); | 578 cmd.AppendSwitch(switches::kForceFirstRun); |
579 installer_state->WriteInstallerResult(*status, 0, NULL); | 579 installer_state->WriteInstallerResult(*status, 0, NULL); |
580 VLOG(1) << "Launching existing system-level chrome instead."; | 580 VLOG(1) << "Launching existing system-level chrome instead."; |
581 base::LaunchProcess(cmd, base::LaunchOptions(), NULL); | 581 base::LaunchProcess(cmd, base::LaunchOptions(), NULL); |
582 } | 582 } |
583 } else { | 583 } else { |
584 // Display an error message for other products. | 584 // It's no longer possible for |product| to be anything other than |
585 *status = installer::SYSTEM_LEVEL_INSTALL_EXISTS; | 585 // Chrome. |
586 installer_state->WriteInstallerResult( | 586 NOTREACHED(); |
587 *status, IDS_INSTALL_SYSTEM_LEVEL_EXISTS_BASE, NULL); | |
588 } | 587 } |
589 return false; | 588 return false; |
590 } | 589 } |
591 } | 590 } |
592 | 591 |
593 } else { // System-level install. | 592 } else { // System-level install. |
594 // --ensure-google-update-present is supported for user-level only. | 593 // --ensure-google-update-present is supported for user-level only. |
595 // The flag is generic, but its primary use case involves App Host. | 594 // The flag is generic, but its primary use case involves App Host. |
596 if (installer_state->ensure_google_update_present()) { | 595 if (installer_state->ensure_google_update_present()) { |
597 LOG(DFATAL) << "--" << installer::switches::kEnsureGoogleUpdatePresent | 596 LOG(DFATAL) << "--" << installer::switches::kEnsureGoogleUpdatePresent |
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1805 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT | 1804 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT |
1806 // to pass through, since this is only returned on uninstall which is | 1805 // to pass through, since this is only returned on uninstall which is |
1807 // never invoked directly by Google Update. | 1806 // never invoked directly by Google Update. |
1808 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1807 return_code = InstallUtil::GetInstallReturnCode(install_status); |
1809 } | 1808 } |
1810 | 1809 |
1811 VLOG(1) << "Installation complete, returning: " << return_code; | 1810 VLOG(1) << "Installation complete, returning: " << return_code; |
1812 | 1811 |
1813 return return_code; | 1812 return return_code; |
1814 } | 1813 } |
OLD | NEW |