summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/installer/setup/setup_main.cc8
-rw-r--r--chrome/installer/setup/setup_util.cc7
-rw-r--r--chrome/installer/util/master_preferences.cc2
-rw-r--r--chrome/installer/util/master_preferences.h3
-rw-r--r--chrome/installer/util/master_preferences_unittest.cc2
-rw-r--r--chrome/installer/util/util_constants.cc5
-rw-r--r--chrome/installer/util/util_constants.h1
7 files changed, 27 insertions, 1 deletions
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc
index e9894e1..14dbf5e 100644
--- a/chrome/installer/setup/setup_main.cc
+++ b/chrome/installer/setup/setup_main.cc
@@ -270,8 +270,14 @@ installer_util::InstallStatus InstallChrome(const CommandLine& cmd_line,
install_msg_base = 0;
}
}
+
+ bool write_chrome_launch_string =
+ !installer_util::GetDistroBooleanPreference(prefs,
+ installer_util::master_preferences::kDoNotRegisterForUpdateLaunch);
+
InstallUtil::WriteInstallerResult(system_level, install_status,
- install_msg_base, &chrome_exe);
+ install_msg_base, write_chrome_launch_string ? &chrome_exe : NULL);
+
if (install_status == installer_util::FIRST_INSTALL_SUCCESS) {
LOG(INFO) << "First install successful.";
// We never want to launch Chrome in system level install mode.
diff --git a/chrome/installer/setup/setup_util.cc b/chrome/installer/setup/setup_util.cc
index 20f2f7e..0e801b2 100644
--- a/chrome/installer/setup/setup_util.cc
+++ b/chrome/installer/setup/setup_util.cc
@@ -54,6 +54,13 @@ DictionaryValue* setup_util::GetInstallPreferences(
installer_util::SetDistroBooleanPreference(
prefs, installer_util::master_preferences::kDoNotCreateShortcuts, true);
+ if (cmd_line.HasSwitch(
+ installer_util::switches::kDoNotRegisterForUpdateLaunch))
+ installer_util::SetDistroBooleanPreference(
+ prefs,
+ installer_util::master_preferences::kDoNotRegisterForUpdateLaunch,
+ true);
+
if (cmd_line.HasSwitch(installer_util::switches::kDoNotLaunchChrome))
installer_util::SetDistroBooleanPreference(
prefs, installer_util::master_preferences::kDoNotLaunchChrome, true);
diff --git a/chrome/installer/util/master_preferences.cc b/chrome/installer/util/master_preferences.cc
index df28658..98f5ba8 100644
--- a/chrome/installer/util/master_preferences.cc
+++ b/chrome/installer/util/master_preferences.cc
@@ -30,6 +30,8 @@ const wchar_t kDistroShowWelcomePage[] = L"show_welcome_page";
const wchar_t kDistroSkipFirstRunPref[] = L"skip_first_run_ui";
const wchar_t kDoNotCreateShortcuts[] = L"do_not_create_shortcuts";
const wchar_t kDoNotLaunchChrome[] = L"do_not_launch_chrome";
+const wchar_t kDoNotRegisterForUpdateLaunch[] =
+ L"do_not_register_for_update_launch";
const wchar_t kMakeChromeDefault[] = L"make_chrome_default";
const wchar_t kMakeChromeDefaultForUser[] = L"make_chrome_default_for_user";
const wchar_t kRequireEula[] = L"require_eula";
diff --git a/chrome/installer/util/master_preferences.h b/chrome/installer/util/master_preferences.h
index ec88c14..335a4ad 100644
--- a/chrome/installer/util/master_preferences.h
+++ b/chrome/installer/util/master_preferences.h
@@ -45,6 +45,9 @@ extern const wchar_t kDistroSkipFirstRunPref[];
extern const wchar_t kDoNotCreateShortcuts[];
// Boolean. Do not launch Chrome after first install. Cmd line override present.
extern const wchar_t kDoNotLaunchChrome[];
+// Boolean. Do not register with Google Update to have Chrome launched after
+// install. Cmd line override present.
+extern const wchar_t kDoNotRegisterForUpdateLaunch[];
// Boolean. Register Chrome as default browser. Cmd line override present.
extern const wchar_t kMakeChromeDefault[];
// Boolean. Register Chrome as default browser for the current user.
diff --git a/chrome/installer/util/master_preferences_unittest.cc b/chrome/installer/util/master_preferences_unittest.cc
index 24eacae..18f3a6b 100644
--- a/chrome/installer/util/master_preferences_unittest.cc
+++ b/chrome/installer/util/master_preferences_unittest.cc
@@ -140,6 +140,8 @@ TEST(MasterPreferencesTest, ParseMissingDistroParams) {
EXPECT_TRUE(installer_util::GetDistroBooleanPreference(prefs.get(),
installer_util::master_preferences::kDoNotLaunchChrome));
EXPECT_FALSE(installer_util::GetDistroBooleanPreference(prefs.get(),
+ installer_util::master_preferences::kDoNotRegisterForUpdateLaunch));
+ EXPECT_FALSE(installer_util::GetDistroBooleanPreference(prefs.get(),
installer_util::master_preferences::kMakeChromeDefault));
EXPECT_FALSE(installer_util::GetDistroBooleanPreference(prefs.get(),
installer_util::master_preferences::kMakeChromeDefaultForUser));
diff --git a/chrome/installer/util/util_constants.cc b/chrome/installer/util/util_constants.cc
index ad9be15..4b791dc 100644
--- a/chrome/installer/util/util_constants.cc
+++ b/chrome/installer/util/util_constants.cc
@@ -24,6 +24,11 @@ const wchar_t kDoNotCreateShortcuts[] = L"do-not-create-shortcuts";
// Prevent installer from launching Chrome after a successful first install.
const wchar_t kDoNotLaunchChrome[] = L"do-not-launch-chrome";
+// Prevents installer from writing the Google Update key that causes Google
+// Update to launch Chrome after a first install.
+const wchar_t kDoNotRegisterForUpdateLaunch[] =
+ L"do-not-register-for-update-launch";
+
// By default we remove all shared (between users) files, registry entries etc
// during uninstall. If this option is specified together with kUninstall option
// we do not clean up shared entries otherwise this option is ignored.
diff --git a/chrome/installer/util/util_constants.h b/chrome/installer/util/util_constants.h
index 6893fdf..534d770 100644
--- a/chrome/installer/util/util_constants.h
+++ b/chrome/installer/util/util_constants.h
@@ -48,6 +48,7 @@ extern const wchar_t kDeleteProfile[];
extern const wchar_t kDisableLogging[];
extern const wchar_t kDoNotCreateShortcuts[];
extern const wchar_t kDoNotLaunchChrome[];
+extern const wchar_t kDoNotRegisterForUpdateLaunch[];
extern const wchar_t kDoNotRemoveSharedItems[];
extern const wchar_t kEnableLogging[];
extern const wchar_t kForceUninstall[];