chore: modernize ListValue code in session (#34656)

* chore: modernize ListValue code in session

* also in browser_context
This commit is contained in:
Jeremy Rose 2022-06-22 01:14:35 -07:00 committed by GitHub
parent ad7aab8338
commit 73c85410c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View file

@ -220,9 +220,10 @@ void ElectronBrowserContext::InitPrefs() {
std::string default_code = spellcheck::GetCorrespondingSpellCheckLanguage(
base::i18n::GetConfiguredLocale());
if (!default_code.empty()) {
base::ListValue language_codes;
base::Value::List language_codes;
language_codes.Append(default_code);
prefs()->Set(spellcheck::prefs::kSpellCheckDictionaries, language_codes);
prefs()->Set(spellcheck::prefs::kSpellCheckDictionaries,
base::Value(std::move(language_codes)));
}
}
#endif