Index: chrome/browser/spellchecker/spellcheck_factory.cc |
diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc |
index 8df78f46373675ed8429088611998a4039881e01..8720f22f59d6ed0c5ced85f9eee7889f1f2ff4cb 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,10 +69,20 @@ KeyedService* SpellcheckServiceFactory::BuildServiceInstanceFor( |
void SpellcheckServiceFactory::RegisterProfilePrefs( |
user_prefs::PrefRegistrySyncable* user_prefs) { |
// TODO(estade): IDS_SPELLCHECK_DICTIONARY should be an ASCII string. |
+ |
+ const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
+ if (command_line->HasSwitch(switches::kEnableMultilingualSpellChecker)) { |
+ user_prefs->RegisterLocalizedStringPref( |
+ prefs::kSpellCheckDictionaries, |
+ IDS_SPELLCHECK_DICTIONARY, |
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
+ } |
+ |
user_prefs->RegisterLocalizedStringPref( |
prefs::kSpellCheckDictionary, |
IDS_SPELLCHECK_DICTIONARY, |
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
+ |
user_prefs->RegisterBooleanPref( |
prefs::kSpellCheckUseSpellingService, |
false, |