| Index: chrome/browser/spellchecker/spellcheck_factory.cc
|
| diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc
|
| index edbed4055410f4b5c9027f3023dea245aa2fd68d..ed530e7ff9375d007d08ac6e930a59d45b3f1474 100644
|
| --- a/chrome/browser/spellchecker/spellcheck_factory.cc
|
| +++ b/chrome/browser/spellchecker/spellcheck_factory.cc
|
| @@ -4,10 +4,13 @@
|
|
|
| #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/common/spellcheck_common.h"
|
| #include "chrome/grit/locale_settings.h"
|
| #include "components/keyed_service/content/browser_context_dependency_manager.h"
|
| #include "components/pref_registry/pref_registry_syncable.h"
|
| @@ -69,9 +72,21 @@ KeyedService* SpellcheckServiceFactory::BuildServiceInstanceFor(
|
| void SpellcheckServiceFactory::RegisterProfilePrefs(
|
| user_prefs::PrefRegistrySyncable* user_prefs) {
|
| // TODO(estade): IDS_SPELLCHECK_DICTIONARY should be an ASCII string.
|
| - user_prefs->RegisterStringPref(
|
| - prefs::kSpellCheckDictionary,
|
| - l10n_util::GetStringUTF8(IDS_SPELLCHECK_DICTIONARY));
|
| +
|
| + // TODO(juliusa): Implement preference migration between multilingual
|
| + // spellchecking and single-language spellchecking.
|
| + if (chrome::spellcheck_common::MultilingualSpellcheckIsEnabled()) {
|
| + user_prefs->RegisterStringPref(
|
| + prefs::kSpellCheckDictionaries,
|
| + l10n_util::GetStringUTF8(IDS_SPELLCHECK_DICTIONARY),
|
| + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
| + } else {
|
| + user_prefs->RegisterStringPref(
|
| + prefs::kSpellCheckDictionary,
|
| + l10n_util::GetStringUTF8(IDS_SPELLCHECK_DICTIONARY),
|
| + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
| + }
|
| +
|
| user_prefs->RegisterBooleanPref(prefs::kSpellCheckUseSpellingService, false);
|
| user_prefs->RegisterBooleanPref(
|
| prefs::kEnableContinuousSpellcheck,
|
|
|