| 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 19 matching lines...) Expand all Loading... |
| 30 #include "base/win/scoped_com_initializer.h" | 30 #include "base/win/scoped_com_initializer.h" |
| 31 #include "base/win/scoped_comptr.h" | 31 #include "base/win/scoped_comptr.h" |
| 32 #include "base/win/scoped_handle.h" | 32 #include "base/win/scoped_handle.h" |
| 33 #include "base/win/win_util.h" | 33 #include "base/win/win_util.h" |
| 34 #include "base/win/windows_version.h" | 34 #include "base/win/windows_version.h" |
| 35 #include "breakpad/src/client/windows/handler/exception_handler.h" | 35 #include "breakpad/src/client/windows/handler/exception_handler.h" |
| 36 #include "chrome/common/chrome_constants.h" | 36 #include "chrome/common/chrome_constants.h" |
| 37 #include "chrome/common/chrome_switches.h" | 37 #include "chrome/common/chrome_switches.h" |
| 38 #include "chrome/installer/setup/archive_patch_helper.h" | 38 #include "chrome/installer/setup/archive_patch_helper.h" |
| 39 #include "chrome/installer/setup/cf_migration.h" | 39 #include "chrome/installer/setup/cf_migration.h" |
| 40 #include "chrome/installer/setup/chrome_frame_quick_enable.h" | |
| 41 #include "chrome/installer/setup/install.h" | 40 #include "chrome/installer/setup/install.h" |
| 42 #include "chrome/installer/setup/install_worker.h" | 41 #include "chrome/installer/setup/install_worker.h" |
| 43 #include "chrome/installer/setup/setup_constants.h" | 42 #include "chrome/installer/setup/setup_constants.h" |
| 44 #include "chrome/installer/setup/setup_util.h" | 43 #include "chrome/installer/setup/setup_util.h" |
| 45 #include "chrome/installer/setup/uninstall.h" | 44 #include "chrome/installer/setup/uninstall.h" |
| 46 #include "chrome/installer/util/browser_distribution.h" | 45 #include "chrome/installer/util/browser_distribution.h" |
| 47 #include "chrome/installer/util/channel_info.h" | 46 #include "chrome/installer/util/channel_info.h" |
| 48 #include "chrome/installer/util/delete_after_reboot_helper.h" | 47 #include "chrome/installer/util/delete_after_reboot_helper.h" |
| 49 #include "chrome/installer/util/delete_tree_work_item.h" | 48 #include "chrome/installer/util/delete_tree_work_item.h" |
| 50 #include "chrome/installer/util/eula_util.h" | 49 #include "chrome/installer/util/eula_util.h" |
| (...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1205 InstallUtil::GetChromeVersion(browser_dist, true, &installed_version); | 1204 InstallUtil::GetChromeVersion(browser_dist, true, &installed_version); |
| 1206 if (!installed_version.IsValid()) { | 1205 if (!installed_version.IsValid()) { |
| 1207 LOG(ERROR) << "No installation of " | 1206 LOG(ERROR) << "No installation of " |
| 1208 << browser_dist->GetDisplayName() | 1207 << browser_dist->GetDisplayName() |
| 1209 << " found for system-level toast."; | 1208 << " found for system-level toast."; |
| 1210 } else { | 1209 } else { |
| 1211 product.LaunchUserExperiment( | 1210 product.LaunchUserExperiment( |
| 1212 cmd_line.GetProgram(), installer::REENTRY_SYS_UPDATE, true); | 1211 cmd_line.GetProgram(), installer::REENTRY_SYS_UPDATE, true); |
| 1213 } | 1212 } |
| 1214 } | 1213 } |
| 1215 } else if (cmd_line.HasSwitch(installer::switches::kChromeFrameQuickEnable)) { | |
| 1216 *exit_code = installer::ChromeFrameQuickEnable(original_state, | |
| 1217 installer_state); | |
| 1218 } else if (cmd_line.HasSwitch(installer::switches::kPatch)) { | 1214 } else if (cmd_line.HasSwitch(installer::switches::kPatch)) { |
| 1219 const std::string patch_type_str( | 1215 const std::string patch_type_str( |
| 1220 cmd_line.GetSwitchValueASCII(installer::switches::kPatch)); | 1216 cmd_line.GetSwitchValueASCII(installer::switches::kPatch)); |
| 1221 const base::FilePath input_file( | 1217 const base::FilePath input_file( |
| 1222 cmd_line.GetSwitchValuePath(installer::switches::kInputFile)); | 1218 cmd_line.GetSwitchValuePath(installer::switches::kInputFile)); |
| 1223 const base::FilePath patch_file( | 1219 const base::FilePath patch_file( |
| 1224 cmd_line.GetSwitchValuePath(installer::switches::kPatchFile)); | 1220 cmd_line.GetSwitchValuePath(installer::switches::kPatchFile)); |
| 1225 const base::FilePath output_file( | 1221 const base::FilePath output_file( |
| 1226 cmd_line.GetSwitchValuePath(installer::switches::kOutputFile)); | 1222 cmd_line.GetSwitchValuePath(installer::switches::kOutputFile)); |
| 1227 | 1223 |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1768 | 1764 |
| 1769 // Some command line options don't work with SxS install/uninstall | 1765 // Some command line options don't work with SxS install/uninstall |
| 1770 if (InstallUtil::IsChromeSxSProcess()) { | 1766 if (InstallUtil::IsChromeSxSProcess()) { |
| 1771 if (system_install || | 1767 if (system_install || |
| 1772 prefs.is_multi_install() || | 1768 prefs.is_multi_install() || |
| 1773 cmd_line.HasSwitch(installer::switches::kForceUninstall) || | 1769 cmd_line.HasSwitch(installer::switches::kForceUninstall) || |
| 1774 cmd_line.HasSwitch(installer::switches::kMakeChromeDefault) || | 1770 cmd_line.HasSwitch(installer::switches::kMakeChromeDefault) || |
| 1775 cmd_line.HasSwitch(installer::switches::kRegisterChromeBrowser) || | 1771 cmd_line.HasSwitch(installer::switches::kRegisterChromeBrowser) || |
| 1776 cmd_line.HasSwitch(installer::switches::kRemoveChromeRegistration) || | 1772 cmd_line.HasSwitch(installer::switches::kRemoveChromeRegistration) || |
| 1777 cmd_line.HasSwitch(installer::switches::kInactiveUserToast) || | 1773 cmd_line.HasSwitch(installer::switches::kInactiveUserToast) || |
| 1778 cmd_line.HasSwitch(installer::switches::kSystemLevelToast) || | 1774 cmd_line.HasSwitch(installer::switches::kSystemLevelToast)) { |
| 1779 cmd_line.HasSwitch(installer::switches::kChromeFrameQuickEnable)) { | |
| 1780 return installer::SXS_OPTION_NOT_SUPPORTED; | 1775 return installer::SXS_OPTION_NOT_SUPPORTED; |
| 1781 } | 1776 } |
| 1782 } | 1777 } |
| 1783 | 1778 |
| 1784 int exit_code = 0; | 1779 int exit_code = 0; |
| 1785 if (HandleNonInstallCmdLineOptions( | 1780 if (HandleNonInstallCmdLineOptions( |
| 1786 original_state, cmd_line, &installer_state, &exit_code)) { | 1781 original_state, cmd_line, &installer_state, &exit_code)) { |
| 1787 return exit_code; | 1782 return exit_code; |
| 1788 } | 1783 } |
| 1789 | 1784 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1890 // Call the newly updated setup.exe with kUncompressedArchive and | 1885 // Call the newly updated setup.exe with kUncompressedArchive and |
| 1891 // kMigrateChromeFrame to perform the migration. | 1886 // kMigrateChromeFrame to perform the migration. |
| 1892 LaunchChromeFrameMigrationProcess(*chrome_frame_state, cmd_line, | 1887 LaunchChromeFrameMigrationProcess(*chrome_frame_state, cmd_line, |
| 1893 installer_directory, system_install); | 1888 installer_directory, system_install); |
| 1894 } | 1889 } |
| 1895 | 1890 |
| 1896 VLOG(1) << "Installation complete, returning: " << return_code; | 1891 VLOG(1) << "Installation complete, returning: " << return_code; |
| 1897 | 1892 |
| 1898 return return_code; | 1893 return return_code; |
| 1899 } | 1894 } |
| OLD | NEW |