Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1583)

Unified Diff: chrome/browser/spellchecker/spellcheck_service.cc

Issue 1602303002: [mac] Send the system spellchecker language to the renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_platform_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/spellchecker/spellcheck_service.cc
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
index 7943c1d267006292c7d8433270d7299dcb7e34f1..a16fca43c9e64cea336b6f4131ce79a1f5bbc46a 100644
--- a/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
@@ -48,6 +48,12 @@ SpellcheckService::SpellcheckService(content::BrowserContext* context)
StringListPrefMember dictionaries_pref;
dictionaries_pref.Init(prefs::kSpellCheckDictionaries, prefs);
std::string first_of_dictionaries;
+
+#if defined(USE_BROWSER_SPELLCHECKER)
+ dictionaries_pref.SetValue(std::vector<std::string>(
+ 1, spellcheck_platform::GetSpellCheckerLanguage()));
+ first_of_dictionaries = dictionaries_pref.GetValue().front();
groby-ooo-7-16 2016/01/26 01:30:10 Can you add a short explanation what either code s
please use gerrit instead 2016/01/26 20:54:34 Done.
+#else
if (!dictionaries_pref.GetValue().empty())
first_of_dictionaries = dictionaries_pref.GetValue().front();
@@ -80,6 +86,7 @@ SpellcheckService::SpellcheckService(content::BrowserContext* context)
dictionaries_pref.SetValue(
std::vector<std::string>(1, first_of_dictionaries));
}
+#endif // defined(USE_BROWSER_SPELLCHECKER)
std::string language_code;
std::string country_code;
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_platform_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698