OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
884 NULL); | 884 NULL); |
885 } | 885 } |
886 // We will be exiting normally, so clear the stage indicator. | 886 // We will be exiting normally, so clear the stage indicator. |
887 installer_state->UpdateStage(installer::NO_STAGE); | 887 installer_state->UpdateStage(installer::NO_STAGE); |
888 } else if (cmd_line.HasSwitch(installer::switches::kShowEula)) { | 888 } else if (cmd_line.HasSwitch(installer::switches::kShowEula)) { |
889 // Check if we need to show the EULA. If it is passed as a command line | 889 // Check if we need to show the EULA. If it is passed as a command line |
890 // then the dialog is shown and regardless of the outcome setup exits here. | 890 // then the dialog is shown and regardless of the outcome setup exits here. |
891 std::wstring inner_frame = | 891 std::wstring inner_frame = |
892 cmd_line.GetSwitchValueNative(installer::switches::kShowEula); | 892 cmd_line.GetSwitchValueNative(installer::switches::kShowEula); |
893 *exit_code = ShowEULADialog(inner_frame); | 893 *exit_code = ShowEULADialog(inner_frame); |
894 if (installer::EULA_REJECTED != *exit_code) | 894 if (installer::EULA_REJECTED != *exit_code) { |
895 GoogleUpdateSettings::SetEULAConsent(original_state, true); | 895 GoogleUpdateSettings::SetEULAConsent( |
| 896 original_state, BrowserDistribution::GetDistribution(), true); |
| 897 } |
896 } else if (cmd_line.HasSwitch( | 898 } else if (cmd_line.HasSwitch( |
897 installer::switches::kRegisterChromeBrowser)) { | 899 installer::switches::kRegisterChromeBrowser)) { |
898 installer::InstallStatus status = installer::UNKNOWN_STATUS; | 900 installer::InstallStatus status = installer::UNKNOWN_STATUS; |
899 const Product* chrome_install = | 901 const Product* chrome_install = |
900 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER); | 902 installer_state->FindProduct(BrowserDistribution::CHROME_BROWSER); |
901 if (chrome_install) { | 903 if (chrome_install) { |
902 // If --register-chrome-browser option is specified, register all | 904 // If --register-chrome-browser option is specified, register all |
903 // Chrome protocol/file associations, as well as register it as a valid | 905 // Chrome protocol/file associations, as well as register it as a valid |
904 // browser for Start Menu->Internet shortcut. This switch will also | 906 // browser for Start Menu->Internet shortcut. This switch will also |
905 // register Chrome as a valid handler for a set of URL protocols that | 907 // register Chrome as a valid handler for a set of URL protocols that |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1300 if (!(installer_state.is_msi() && is_uninstall)) | 1302 if (!(installer_state.is_msi() && is_uninstall)) |
1301 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT | 1303 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT |
1302 // to pass through, since this is only returned on uninstall which is | 1304 // to pass through, since this is only returned on uninstall which is |
1303 // never invoked directly by Google Update. | 1305 // never invoked directly by Google Update. |
1304 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1306 return_code = InstallUtil::GetInstallReturnCode(install_status); |
1305 | 1307 |
1306 VLOG(1) << "Installation complete, returning: " << return_code; | 1308 VLOG(1) << "Installation complete, returning: " << return_code; |
1307 | 1309 |
1308 return return_code; | 1310 return return_code; |
1309 } | 1311 } |
OLD | NEW |