diff options
author | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-08 20:30:53 +0000 |
---|---|---|
committer | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-08 20:30:53 +0000 |
commit | b3d565264e6073bd00e4dfd81c8f887ea01fb58c (patch) | |
tree | b37f2589de3352d27f2bbcca2a579780f8c0b168 /chrome/installer/setup/main.cc | |
parent | e292fca9e47cba237bb5b2d885f900eddecd70c5 (diff) | |
download | chromium_src-b3d565264e6073bd00e4dfd81c8f887ea01fb58c.zip chromium_src-b3d565264e6073bd00e4dfd81c8f887ea01fb58c.tar.gz chromium_src-b3d565264e6073bd00e4dfd81c8f887ea01fb58c.tar.bz2 |
More addions to the installer html dialog class
- EulaDialog subclass
- Wired the output parameter
BUG=1468838
Review URL: http://codereview.chromium.org/13601
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6533 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/setup/main.cc')
-rwxr-xr-x | chrome/installer/setup/main.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/chrome/installer/setup/main.cc b/chrome/installer/setup/main.cc index 4aa4f37..5307c1c 100755 --- a/chrome/installer/setup/main.cc +++ b/chrome/installer/setup/main.cc @@ -21,6 +21,7 @@ #include "chrome/installer/util/browser_distribution.h" #include "chrome/installer/util/delete_tree_work_item.h" #include "chrome/installer/util/helper.h" +#include "chrome/installer/util/html_dialog.h" #include "chrome/installer/util/install_util.h" #include "chrome/installer/util/logging_installer.h" #include "chrome/installer/util/lzma_util.h" @@ -430,8 +431,19 @@ installer_util::InstallStatus UninstallChrome(const CommandLine& cmd_line, *version, remove_all, force); } -} // namespace +// This function is temporary and meant to live while we get our eula dialogs +// looking sharp. If the cmd line has --eula-test=path then the eula dialog +// will be shown and no matter what the selection is the installer will exit. +bool HandleEULADialog(const CommandLine& cmdline) { + std:: wstring eula_path(cmdline.GetSwitchValue(L"eula-test")); + if (eula_path.empty()) + return true; + installer::EulaHTMLDialog dlg(eula_path); + dlg.ShowModal(); + return false; +} +} // namespace int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance, wchar_t* command_line, int show_command) { @@ -446,6 +458,9 @@ int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance, bool system_install = (options & installer_util::SYSTEM_LEVEL) != 0; LOG(INFO) << "system install is " << system_install; + if (!HandleEULADialog(parsed_command_line)) + return 0; + // Check to make sure current system is WinXP or later. If not, log // error message and get out. if (!InstallUtil::IsOSSupported()) { |