summaryrefslogtreecommitdiffstats
path: root/chrome/installer/setup/setup_main.cc
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-11 21:36:55 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-11 21:36:55 +0000
commit933d320d6e4366547dc7abffb32fa2d06a1ae7d4 (patch)
tree0183066fe593c80c2c385a426606295f510f45e4 /chrome/installer/setup/setup_main.cc
parentc742d957136361c4164e0e93ad78267e558339e8 (diff)
downloadchromium_src-933d320d6e4366547dc7abffb32fa2d06a1ae7d4.zip
chromium_src-933d320d6e4366547dc7abffb32fa2d06a1ae7d4.tar.gz
chromium_src-933d320d6e4366547dc7abffb32fa2d06a1ae7d4.tar.bz2
Add multi install support to MasterPreferences and start using it in a few places.I'm also adding a constant for CEEE - I named it kCeee instead of kEnableCeee since it's also used in uninstalls.This change is just a beginning of being aware of having more than one product available in setup.
I added some todos and dcheck for myself to keep track of places that will need more significant changes when running multiple installs. BUG=61609 TEST=All installations (chrome, chrome frame, ceee) should work as before with the exception that the CEEE switch is now --ceee and not --enable-ceee. Review URL: http://codereview.chromium.org/4635006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65855 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/setup/setup_main.cc')
-rw-r--r--chrome/installer/setup/setup_main.cc45
1 files changed, 18 insertions, 27 deletions
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc
index 0898017..88b74d1 100644
--- a/chrome/installer/setup/setup_main.cc
+++ b/chrome/installer/setup/setup_main.cc
@@ -327,9 +327,13 @@ installer_util::InstallStatus InstallChrome(const CommandLine& cmd_line,
}
bool value = false;
- prefs.GetBool(
- installer_util::master_preferences::kDoNotRegisterForUpdateLaunch,
- &value);
+ if (prefs.install_chrome()) {
+ prefs.GetBool(
+ installer_util::master_preferences::kDoNotRegisterForUpdateLaunch,
+ &value);
+ } else {
+ value = true; // Never register.
+ }
bool write_chrome_launch_string = (!value) &&
(install_status != installer_util::IN_USE_UPDATED);
@@ -338,12 +342,15 @@ installer_util::InstallStatus InstallChrome(const CommandLine& cmd_line,
if (install_status == installer_util::FIRST_INSTALL_SUCCESS) {
VLOG(1) << "First install successful.";
- // We never want to launch Chrome in system level install mode.
- bool do_not_launch_chrome = false;
- prefs.GetBool(installer_util::master_preferences::kDoNotLaunchChrome,
- &do_not_launch_chrome);
- if (!system_level && !do_not_launch_chrome)
- installer::LaunchChrome(system_level);
+ if (prefs.install_chrome()) {
+ // We never want to launch Chrome in system level install mode.
+ bool do_not_launch_chrome = false;
+ prefs.GetBool(
+ installer_util::master_preferences::kDoNotLaunchChrome,
+ &do_not_launch_chrome);
+ if (!system_level && !do_not_launch_chrome)
+ installer::LaunchChrome(system_level);
+ }
} else if ((install_status == installer_util::NEW_VERSION_UPDATED) ||
(install_status == installer_util::IN_USE_UPDATED)) {
installer_setup::RemoveLegacyRegistryKeys();
@@ -618,28 +625,12 @@ int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance,
// The exit manager is in charge of calling the dtors of singletons.
base::AtExitManager exit_manager;
CommandLine::Init(0, NULL);
- CommandLine* mutable_command_line = CommandLine::ForCurrentProcess();
-
- if (mutable_command_line->HasSwitch(installer_util::switches::kChromeFrame)) {
- mutable_command_line->AppendSwitch(
- WideToASCII(installer_util::switches::kDoNotCreateShortcuts));
- mutable_command_line->AppendSwitch(
- WideToASCII(installer_util::switches::kDoNotLaunchChrome));
- mutable_command_line->AppendSwitch(
- WideToASCII(installer_util::switches::kDoNotRegisterForUpdateLaunch));
- }
- const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
-
- installer::InitInstallerLogging(parsed_command_line);
const installer_util::MasterPreferences& prefs =
InstallUtil::GetMasterPreferencesForCurrentProcess();
- bool value = false;
- if (prefs.GetBool(installer_util::master_preferences::kVerboseLogging,
- &value) && value) {
- logging::SetMinLogLevel(logging::LOG_INFO);
- }
+ installer::InitInstallerLogging(prefs);
+ const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
VLOG(1) << "Command Line: " << parsed_command_line.command_line_string();
bool system_install = false;