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

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

Issue 654653002: Enables the user to select multiple languages for spellchecking (UI) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Temporarily disabled tests, fixed a bug Created 6 years, 2 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
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,

Powered by Google App Engine
This is Rietveld 408576698