Index: chrome/browser/spellchecker/spellcheck_factory.cc |
diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc |
index 7d7e1df68fa11fd40643e1065c3dc9c7e85e1362..faf85505d0bf44aa1e462101d2692b00df54ddf8 100644 |
--- a/chrome/browser/spellchecker/spellcheck_factory.cc |
+++ b/chrome/browser/spellchecker/spellcheck_factory.cc |
@@ -4,9 +4,11 @@ |
#include "chrome/browser/spellchecker/spellcheck_factory.h" |
+#include "base/command_line.h" |
#include "base/prefs/pref_service.h" |
#include "chrome/browser/profiles/incognito_helpers.h" |
#include "chrome/browser/spellchecker/spellcheck_service.h" |
+#include "chrome/common/chrome_switches.h" |
#include "chrome/common/pref_names.h" |
#include "chrome/grit/locale_settings.h" |
#include "components/keyed_service/content/browser_context_dependency_manager.h" |
@@ -67,6 +69,16 @@ KeyedService* SpellcheckServiceFactory::BuildServiceInstanceFor( |
void SpellcheckServiceFactory::RegisterProfilePrefs( |
user_prefs::PrefRegistrySyncable* user_prefs) { |
+ |
+ const base::CommandLine* command_line = |
+ base::CommandLine::ForCurrentProcess(); |
+ if (command_line->HasSwitch(switches::kEnableMultilingualSpellChecker)) { |
+ user_prefs->RegisterStringPref( |
+ prefs::kSpellCheckDictionaries, |
+ l10n_util::GetStringUTF8(IDS_SPELLCHECK_DICTIONARY), |
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
+ } |
+ |
// TODO(estade): IDS_SPELLCHECK_DICTIONARY should be an ASCII string. |
user_prefs->RegisterStringPref( |
prefs::kSpellCheckDictionary, |
please use gerrit instead
2015/02/23 18:51:47
No need to register kSpellCheckDictionary pref whe
Klemen Forstnerič
2015/02/24 21:57:45
Done. Do I also create a separate IDS_SPELLCHECK_D
please use gerrit instead
2015/02/24 23:38:38
Let's use the new IDS_SPELLCHECK_DICTIONARIES, bec
Klemen Forstnerič
2015/02/25 10:00:00
I agree, I will make the change.
|