diff options
author | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-29 03:27:35 +0000 |
---|---|---|
committer | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-29 03:27:35 +0000 |
commit | 9e7a2dcebbbe2df2b019f213e3b39be53237e3ab (patch) | |
tree | 1e78321d2100a4e5e49b482f3d2596fd293c44e2 /chrome/installer/setup | |
parent | 09a1bd76e3fd08b2ba0035af7ee2f0b60661174b (diff) | |
download | chromium_src-9e7a2dcebbbe2df2b019f213e3b39be53237e3ab.zip chromium_src-9e7a2dcebbbe2df2b019f213e3b39be53237e3ab.tar.gz chromium_src-9e7a2dcebbbe2df2b019f213e3b39be53237e3ab.tar.bz2 |
Wire the stats consent checkbox of the EULA
- Collected in setup.exe passed to chrome via return code
- Depends on an updated oem.html and JS code by Glen
BUG=1468838
Review URL: http://codereview.chromium.org/19649
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8866 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/setup')
-rwxr-xr-x | chrome/installer/setup/main.cc | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/chrome/installer/setup/main.cc b/chrome/installer/setup/main.cc index b4fc90c..2177eb9 100755 --- a/chrome/installer/setup/main.cc +++ b/chrome/installer/setup/main.cc @@ -444,19 +444,25 @@ installer_util::InstallStatus UninstallChrome(const CommandLine& cmd_line, *version, remove_all, force); } -bool ShowEULADialog() { +installer_util::InstallStatus ShowEULADialog() { LOG(INFO) << "About to show EULA"; std::wstring eula_path = installer_util::GetLocalizedEulaResource(); if (eula_path.empty()) { LOG(ERROR) << "No EULA path available"; - return false; + return installer_util::EULA_REJECTED; } installer::EulaHTMLDialog dlg(eula_path); - if (!dlg.ShowModal()) { + installer::EulaHTMLDialog::Outcome outcome = dlg.ShowModal(); + if (installer::EulaHTMLDialog::REJECTED == outcome) { LOG(ERROR) << "EULA rejected or EULA failure"; - return false; + return installer_util::EULA_REJECTED; } - return true; + if (installer::EulaHTMLDialog::ACCEPTED_OPT_IN == outcome) { + LOG(INFO) << "EULA accepted (opt-in)"; + return installer_util::EULA_ACCEPTED_OPT_IN; + } + LOG(INFO) << "EULA accepted (no opt-in)"; + return installer_util::EULA_ACCEPTED; } } // namespace @@ -494,17 +500,10 @@ int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance, return installer_util::OS_ERROR; } - // Check if we need to show the EULA. There are two cases: - // 1- If it is passed as a command line (--show-eula), then the dialog is - // shown and regardless of the outcome setup exits here. - // 2- If it is found in the installerdata file then the EULA is shown - // and the installation proceeds if the user accepts. + // Check if we need to show the EULA. If it is passed as a command line + // then the dialog is shown and regardless of the outcome setup exits here. if (parsed_command_line.HasSwitch(installer_util::switches::kShowEula)) { - return (ShowEULADialog() ? - installer_util::EULA_ACCEPTED : installer_util::EULA_REJECTED); - } else if (installer_util::SHOW_EULA_DIALOG & options) { - if (!ShowEULADialog()) - return installer_util::EULA_REJECTED; + return ShowEULADialog(); } // If --register-chrome-browser option is specified, register all |