| Index: chrome/installer/util/master_preferences.cc
|
| diff --git a/chrome/installer/util/master_preferences.cc b/chrome/installer/util/master_preferences.cc
|
| index fa014177d8bafcabf091067ad029f6a4e9e87633..223aa320065ed7e21a75fa02eccc24cefa8d1d8f 100644
|
| --- a/chrome/installer/util/master_preferences.cc
|
| +++ b/chrome/installer/util/master_preferences.cc
|
| @@ -226,6 +226,29 @@ void MasterPreferences::EnforceLegacyPreferences() {
|
| installer::master_preferences::kDoNotCreateQuickLaunchShortcut, true);
|
| }
|
|
|
| + // Deprecated boolean import master preferences now mapped to their duplicates
|
| + // in prefs::.
|
| + static constexpr char kDistroImportHistoryPref[] = "import_history";
|
| + static constexpr char kDistroImportHomePagePref[] = "import_home_page";
|
| + static constexpr char kDistroImportSearchPref[] = "import_search_engine";
|
| + static constexpr char kDistroImportBookmarksPref[] = "import_bookmarks";
|
| +
|
| + static constexpr struct {
|
| + const char* old_distro_pref_path;
|
| + const char* modern_pref_path;
|
| + } kLegacyDistroImportPrefMappings[] = {
|
| + {kDistroImportBookmarksPref, prefs::kImportBookmarks},
|
| + {kDistroImportHistoryPref, prefs::kImportHistory},
|
| + {kDistroImportHomePagePref, prefs::kImportHomepage},
|
| + {kDistroImportSearchPref, prefs::kImportSearchEngine},
|
| + };
|
| +
|
| + for (const auto& mapping : kLegacyDistroImportPrefMappings) {
|
| + bool value = false;
|
| + if (GetBool(mapping.old_distro_pref_path, &value))
|
| + master_dictionary_->SetBoolean(mapping.modern_pref_path, value);
|
| + }
|
| +
|
| #if BUILDFLAG(ENABLE_RLZ)
|
| // Map the RLZ ping delay shipped in the distribution dictionary into real
|
| // prefs.
|
|
|