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 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1632 } | 1632 } |
1633 } else if ((install_status == NEW_VERSION_UPDATED) || | 1633 } else if ((install_status == NEW_VERSION_UPDATED) || |
1634 (install_status == IN_USE_UPDATED)) { | 1634 (install_status == IN_USE_UPDATED)) { |
1635 const Product* chrome = installer_state.FindProduct( | 1635 const Product* chrome = installer_state.FindProduct( |
1636 BrowserDistribution::CHROME_BROWSER); | 1636 BrowserDistribution::CHROME_BROWSER); |
1637 if (chrome != NULL) { | 1637 if (chrome != NULL) { |
1638 DCHECK_NE(chrome_exe, base::string16()); | 1638 DCHECK_NE(chrome_exe, base::string16()); |
1639 RemoveChromeLegacyRegistryKeys(chrome->distribution(), chrome_exe); | 1639 RemoveChromeLegacyRegistryKeys(chrome->distribution(), chrome_exe); |
1640 } | 1640 } |
1641 } | 1641 } |
| 1642 |
| 1643 if (prefs.install_chrome_app_launcher() && |
| 1644 InstallUtil::GetInstallReturnCode(install_status) == 0) { |
| 1645 std::string webstore_item(google_update::GetUntrustedDataValue( |
| 1646 kInstallFromWebstore)); |
| 1647 if (!webstore_item.empty()) { |
| 1648 bool success = InstallFromWebstore(webstore_item); |
| 1649 VLOG_IF(1, !success) << "Failed to launch app installation."; |
| 1650 } |
| 1651 } |
1642 } | 1652 } |
1643 } | 1653 } |
1644 | 1654 |
1645 // There might be an experiment (for upgrade usually) that needs to happen. | 1655 // There might be an experiment (for upgrade usually) that needs to happen. |
1646 // An experiment's outcome can include chrome's uninstallation. If that is | 1656 // An experiment's outcome can include chrome's uninstallation. If that is |
1647 // the case we would not do that directly at this point but in another | 1657 // the case we would not do that directly at this point but in another |
1648 // instance of setup.exe | 1658 // instance of setup.exe |
1649 // | 1659 // |
1650 // There is another way to reach this same function if this is a system | 1660 // There is another way to reach this same function if this is a system |
1651 // level install. See HandleNonInstallCmdLineOptions(). | 1661 // level install. See HandleNonInstallCmdLineOptions(). |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1832 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT | 1842 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT |
1833 // to pass through, since this is only returned on uninstall which is | 1843 // to pass through, since this is only returned on uninstall which is |
1834 // never invoked directly by Google Update. | 1844 // never invoked directly by Google Update. |
1835 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1845 return_code = InstallUtil::GetInstallReturnCode(install_status); |
1836 } | 1846 } |
1837 | 1847 |
1838 VLOG(1) << "Installation complete, returning: " << return_code; | 1848 VLOG(1) << "Installation complete, returning: " << return_code; |
1839 | 1849 |
1840 return return_code; | 1850 return return_code; |
1841 } | 1851 } |
OLD | NEW |