| Index: chrome/installer/util/master_preferences.cc
|
| diff --git a/chrome/installer/util/master_preferences.cc b/chrome/installer/util/master_preferences.cc
|
| index 2f7ccb696098ecf766689e8fc515caf039eacc72..5ecb6ebec527ce0322fe440c77bb84c4830a52c0 100644
|
| --- a/chrome/installer/util/master_preferences.cc
|
| +++ b/chrome/installer/util/master_preferences.cc
|
| @@ -19,6 +19,7 @@
|
| #include "chrome/installer/util/master_preferences_constants.h"
|
| #include "chrome/installer/util/util_constants.h"
|
| #include "components/variations/pref_names.h"
|
| +#include "rlz/features/features.h"
|
|
|
| namespace {
|
|
|
| @@ -207,17 +208,32 @@ bool MasterPreferences::InitializeFromString(const std::string& json_data) {
|
| }
|
|
|
| void MasterPreferences::EnforceLegacyPreferences() {
|
| + // Boolean. This is a legacy preference and should no longer be used; it is
|
| + // kept around so that old master_preferences which specify
|
| + // "create_all_shortcuts":false still enforce the new
|
| + // "do_not_create_(desktop|quick_launch)_shortcut" preferences. Setting this
|
| + // to true no longer has any impact.
|
| + static constexpr char kCreateAllShortcuts[] = "create_all_shortcuts";
|
| +
|
| // If create_all_shortcuts was explicitly set to false, set
|
| // do_not_create_(desktop|quick_launch)_shortcut to true.
|
| bool create_all_shortcuts = true;
|
| - GetBool(installer::master_preferences::kCreateAllShortcuts,
|
| - &create_all_shortcuts);
|
| + GetBool(kCreateAllShortcuts, &create_all_shortcuts);
|
| if (!create_all_shortcuts) {
|
| distribution_->SetBoolean(
|
| installer::master_preferences::kDoNotCreateDesktopShortcut, true);
|
| distribution_->SetBoolean(
|
| installer::master_preferences::kDoNotCreateQuickLaunchShortcut, true);
|
| }
|
| +
|
| +#if BUILDFLAG(ENABLE_RLZ)
|
| + // Map the RLZ ping delay shipped in the distribution dictionary into real
|
| + // prefs.
|
| + static constexpr char kDistroPingDelay[] = "ping_delay";
|
| + int rlz_ping_delay = 0;
|
| + if (GetInt(kDistroPingDelay, &rlz_ping_delay))
|
| + master_dictionary_->SetInteger(prefs::kRlzPingDelay, rlz_ping_delay);
|
| +#endif // BUILDFLAG(ENABLE_RLZ)
|
| }
|
|
|
| bool MasterPreferences::GetBool(const std::string& name, bool* value) const {
|
|
|