Chromium Code Reviews| 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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 621 | 621 |
| 622 // Trigger Active Setup if it was requested for the chrome product. This needs | 622 // Trigger Active Setup if it was requested for the chrome product. This needs |
| 623 // to be done after the UninstallProduct calls as some of them might | 623 // to be done after the UninstallProduct calls as some of them might |
| 624 // otherwise terminate the process launched by TriggerActiveSetupCommand(). | 624 // otherwise terminate the process launched by TriggerActiveSetupCommand(). |
| 625 if (cmd_line.HasSwitch(installer::switches::kTriggerActiveSetup)) | 625 if (cmd_line.HasSwitch(installer::switches::kTriggerActiveSetup)) |
| 626 InstallUtil::TriggerActiveSetupCommand(); | 626 InstallUtil::TriggerActiveSetupCommand(); |
| 627 | 627 |
| 628 if (!system_level_cmd.GetProgram().empty()) | 628 if (!system_level_cmd.GetProgram().empty()) |
| 629 base::LaunchProcess(system_level_cmd, base::LaunchOptions()); | 629 base::LaunchProcess(system_level_cmd, base::LaunchOptions()); |
| 630 | 630 |
| 631 // Tell Google Update that an uninstall has taken place. | 631 // Tell Google Update that an uninstall has taken place if this install did |
| 632 // Ignore the return value: success or failure of Google Update | 632 // not originate from the MSI. Gogle Update has its own logic relating to |
|
Georges Khalil
2017/04/25 15:18:23
nit: s/Gogle/Google
grt (UTC plus 2)
2017/04/25 18:01:31
<facepalm>
| |
| 633 // has no bearing on the success or failure of Chrome's uninstallation. | 633 // MSI-driven uninstalls that conflicts with this. Ignore the return value: |
| 634 google_update::UninstallGoogleUpdate(installer_state.system_install()); | 634 // success or failure of Google Update has no bearing on the success or |
| 635 // failure of Chrome's uninstallation. | |
| 636 if (!installer_state.is_msi()) | |
| 637 google_update::UninstallGoogleUpdate(installer_state.system_install()); | |
| 635 | 638 |
| 636 return install_status; | 639 return install_status; |
| 637 } | 640 } |
| 638 | 641 |
| 639 installer::InstallStatus InstallProducts( | 642 installer::InstallStatus InstallProducts( |
| 640 const InstallationState& original_state, | 643 const InstallationState& original_state, |
| 641 const base::FilePath& setup_exe, | 644 const base::FilePath& setup_exe, |
| 642 const base::CommandLine& cmd_line, | 645 const base::CommandLine& cmd_line, |
| 643 const MasterPreferences& prefs, | 646 const MasterPreferences& prefs, |
| 644 InstallerState* installer_state, | 647 InstallerState* installer_state, |
| (...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1500 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT | 1503 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT |
| 1501 // to pass through, since this is only returned on uninstall which is | 1504 // to pass through, since this is only returned on uninstall which is |
| 1502 // never invoked directly by Google Update. | 1505 // never invoked directly by Google Update. |
| 1503 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1506 return_code = InstallUtil::GetInstallReturnCode(install_status); |
| 1504 } | 1507 } |
| 1505 | 1508 |
| 1506 VLOG(1) << "Installation complete, returning: " << return_code; | 1509 VLOG(1) << "Installation complete, returning: " << return_code; |
| 1507 | 1510 |
| 1508 return return_code; | 1511 return return_code; |
| 1509 } | 1512 } |
| OLD | NEW |