summaryrefslogtreecommitdiffstats
path: root/chrome/installer/setup/install.cc
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-19 18:19:07 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-19 18:19:07 +0000
commitdf33e777cfc228e34896c0f961b5af6dea40af5e (patch)
tree5506bdb2f37286c661c948165c9cb01f9ef6b3c8 /chrome/installer/setup/install.cc
parent5ad2514a46f2e7b188389ed146494a4bbb7eda81 (diff)
downloadchromium_src-df33e777cfc228e34896c0f961b5af6dea40af5e.zip
chromium_src-df33e777cfc228e34896c0f961b5af6dea40af5e.tar.gz
chromium_src-df33e777cfc228e34896c0f961b5af6dea40af5e.tar.bz2
Make GetDistroBooleanPreference return troolean value.
BUG=23649 TEST=installer_util_unittests, setup_unittests Review URL: http://codereview.chromium.org/269107 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29423 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/setup/install.cc')
-rw-r--r--chrome/installer/setup/install.cc27
1 files changed, 18 insertions, 9 deletions
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc
index 1d3bd7d..c7862b4 100644
--- a/chrome/installer/setup/install.cc
+++ b/chrome/installer/setup/install.cc
@@ -577,8 +577,9 @@ installer_util::InstallStatus installer::InstallOrUpdateChrome(
const std::wstring& install_temp_path, const std::wstring& prefs_path,
const DictionaryValue* prefs, const Version& new_version,
const Version* installed_version) {
- bool system_install = installer_util::GetDistroBooleanPreference(prefs,
- installer_util::master_preferences::kSystemLevel);
+ bool system_install = false;
+ installer_util::GetDistroBooleanPreference(prefs,
+ installer_util::master_preferences::kSystemLevel, &system_install);
std::wstring install_path(GetChromeInstallPath(system_install));
if (install_path.empty()) {
LOG(ERROR) << "Could not get installation destination path.";
@@ -621,20 +622,28 @@ installer_util::InstallStatus installer::InstallOrUpdateChrome(
result = installer_util::NEW_VERSION_UPDATED;
}
+ bool value = false;
if (!installer_util::GetDistroBooleanPreference(prefs,
- installer_util::master_preferences::kDoNotCreateShortcuts)) {
- bool create_all_shortcut = installer_util::GetDistroBooleanPreference(
- prefs, installer_util::master_preferences::kCreateAllShortcuts);
- bool alt_shortcut = installer_util::GetDistroBooleanPreference(prefs,
- installer_util::master_preferences::kAltShortcutText);
+ installer_util::master_preferences::kDoNotCreateShortcuts, &value) ||
+ !value) {
+ bool create_all_shortcut = false;
+ installer_util::GetDistroBooleanPreference(prefs,
+ installer_util::master_preferences::kCreateAllShortcuts,
+ &create_all_shortcut);
+ bool alt_shortcut = false;
+ installer_util::GetDistroBooleanPreference(prefs,
+ installer_util::master_preferences::kAltShortcutText,
+ &alt_shortcut);
if (!CreateOrUpdateChromeShortcuts(exe_path, install_path,
new_version.GetString(), result,
system_install, create_all_shortcut,
alt_shortcut))
LOG(WARNING) << "Failed to create/update start menu shortcut.";
- bool make_chrome_default = installer_util::GetDistroBooleanPreference(
- prefs, installer_util::master_preferences::kMakeChromeDefault);
+ bool make_chrome_default = false;
+ installer_util::GetDistroBooleanPreference(prefs,
+ installer_util::master_preferences::kMakeChromeDefault,
+ &make_chrome_default);
RegisterChromeOnMachine(install_path, system_install,
make_chrome_default);
}