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 <string> | 10 #include <string> |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "chrome/installer/setup/chrome_frame_ready_mode.h" | 36 #include "chrome/installer/setup/chrome_frame_ready_mode.h" |
37 #include "chrome/installer/setup/install.h" | 37 #include "chrome/installer/setup/install.h" |
38 #include "chrome/installer/setup/install_worker.h" | 38 #include "chrome/installer/setup/install_worker.h" |
39 #include "chrome/installer/setup/setup_constants.h" | 39 #include "chrome/installer/setup/setup_constants.h" |
40 #include "chrome/installer/setup/setup_util.h" | 40 #include "chrome/installer/setup/setup_util.h" |
41 #include "chrome/installer/setup/uninstall.h" | 41 #include "chrome/installer/setup/uninstall.h" |
42 #include "chrome/installer/util/browser_distribution.h" | 42 #include "chrome/installer/util/browser_distribution.h" |
43 #include "chrome/installer/util/channel_info.h" | 43 #include "chrome/installer/util/channel_info.h" |
44 #include "chrome/installer/util/delete_after_reboot_helper.h" | 44 #include "chrome/installer/util/delete_after_reboot_helper.h" |
45 #include "chrome/installer/util/delete_tree_work_item.h" | 45 #include "chrome/installer/util/delete_tree_work_item.h" |
| 46 #include "chrome/installer/util/eula_util.h" |
46 #include "chrome/installer/util/google_update_constants.h" | 47 #include "chrome/installer/util/google_update_constants.h" |
47 #include "chrome/installer/util/google_update_settings.h" | 48 #include "chrome/installer/util/google_update_settings.h" |
48 #include "chrome/installer/util/google_update_util.h" | 49 #include "chrome/installer/util/google_update_util.h" |
49 #include "chrome/installer/util/helper.h" | 50 #include "chrome/installer/util/helper.h" |
50 #include "chrome/installer/util/html_dialog.h" | 51 #include "chrome/installer/util/html_dialog.h" |
51 #include "chrome/installer/util/install_util.h" | 52 #include "chrome/installer/util/install_util.h" |
52 #include "chrome/installer/util/installation_state.h" | 53 #include "chrome/installer/util/installation_state.h" |
53 #include "chrome/installer/util/installation_validator.h" | 54 #include "chrome/installer/util/installation_validator.h" |
54 #include "chrome/installer/util/installer_state.h" | 55 #include "chrome/installer/util/installer_state.h" |
55 #include "chrome/installer/util/l10n_string_util.h" | 56 #include "chrome/installer/util/l10n_string_util.h" |
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1398 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER); | 1399 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER); |
1399 installer::InstallStatus status = installer::INVALID_STATE_FOR_OPTION; | 1400 installer::InstallStatus status = installer::INVALID_STATE_FOR_OPTION; |
1400 if (chrome_install) { | 1401 if (chrome_install) { |
1401 installer::HandleOsUpgradeForBrowser(*installer_state, | 1402 installer::HandleOsUpgradeForBrowser(*installer_state, |
1402 *chrome_install); | 1403 *chrome_install); |
1403 status = installer::INSTALL_REPAIRED; | 1404 status = installer::INSTALL_REPAIRED; |
1404 } else { | 1405 } else { |
1405 LOG(DFATAL) << "Chrome product not found."; | 1406 LOG(DFATAL) << "Chrome product not found."; |
1406 } | 1407 } |
1407 *exit_code = InstallUtil::GetInstallReturnCode(status); | 1408 *exit_code = InstallUtil::GetInstallReturnCode(status); |
| 1409 } else if (cmd_line.HasSwitch(installer::switches::kQueryEULAAcceptance)) { |
| 1410 *exit_code = installer::IsEULAAccepted(installer_state->system_install()); |
1408 } else if (cmd_line.HasSwitch(installer::switches::kInactiveUserToast)) { | 1411 } else if (cmd_line.HasSwitch(installer::switches::kInactiveUserToast)) { |
1409 // Launch the inactive user toast experiment. | 1412 // Launch the inactive user toast experiment. |
1410 int flavor = -1; | 1413 int flavor = -1; |
1411 base::StringToInt(cmd_line.GetSwitchValueNative( | 1414 base::StringToInt(cmd_line.GetSwitchValueNative( |
1412 installer::switches::kInactiveUserToast), &flavor); | 1415 installer::switches::kInactiveUserToast), &flavor); |
1413 std::string experiment_group = | 1416 std::string experiment_group = |
1414 cmd_line.GetSwitchValueASCII(installer::switches::kExperimentGroup); | 1417 cmd_line.GetSwitchValueASCII(installer::switches::kExperimentGroup); |
1415 DCHECK_NE(-1, flavor); | 1418 DCHECK_NE(-1, flavor); |
1416 if (flavor == -1) { | 1419 if (flavor == -1) { |
1417 *exit_code = installer::UNKNOWN_STATUS; | 1420 *exit_code = installer::UNKNOWN_STATUS; |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1718 if (!(installer_state.is_msi() && is_uninstall)) | 1721 if (!(installer_state.is_msi() && is_uninstall)) |
1719 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT | 1722 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT |
1720 // to pass through, since this is only returned on uninstall which is | 1723 // to pass through, since this is only returned on uninstall which is |
1721 // never invoked directly by Google Update. | 1724 // never invoked directly by Google Update. |
1722 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1725 return_code = InstallUtil::GetInstallReturnCode(install_status); |
1723 | 1726 |
1724 VLOG(1) << "Installation complete, returning: " << return_code; | 1727 VLOG(1) << "Installation complete, returning: " << return_code; |
1725 | 1728 |
1726 return return_code; | 1729 return return_code; |
1727 } | 1730 } |
OLD | NEW |