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

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: Fixed a regression. Created 5 years, 10 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 7d7e1df68fa11fd40643e1065c3dc9c7e85e1362..74afcc2f8213f26e6d69fcca2d4a450ef85a6f5a 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"
@@ -68,10 +70,19 @@ 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),
- user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableMultilingualSpellChecker)) {
groby-ooo-7-16 2015/03/03 17:54:34 How is preference migration handled? (I.e. what ha
+ user_prefs->RegisterStringPref(
+ prefs::kSpellCheckDictionaries,
+ l10n_util::GetStringUTF8(IDS_SPELLCHECK_DICTIONARY),
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ } else {
+ user_prefs->RegisterStringPref(
+ prefs::kSpellCheckDictionary,
+ l10n_util::GetStringUTF8(IDS_SPELLCHECK_DICTIONARY),
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
Dan Beam 2015/03/02 22:40:08 do these preferences need to be migrated?
groby-ooo-7-16 2015/03/03 17:54:34 Heh. That was off-screen when I asked :)
+ }
+
user_prefs->RegisterBooleanPref(
prefs::kSpellCheckUseSpellingService,
false,

Powered by Google App Engine
This is Rietveld 408576698