Index: chrome/installer/util/master_preferences.cc |
diff --git a/chrome/installer/util/master_preferences.cc b/chrome/installer/util/master_preferences.cc |
index 5ecb6ebec527ce0322fe440c77bb84c4830a52c0..3f2b1ded49bde3b580f5589d1a6e9ef4f421d7b0 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. |