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

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

Issue 2244083002: Componentize spellcheck [4]: spellcheck/browser and android java-side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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 deabf96a0a17273af651190116ef25b8cd19c7b5..64cbbacc0d05ebd069ff871c989158d5df5d0c5c 100644
--- a/chrome/browser/spellchecker/spellcheck_factory.cc
+++ b/chrome/browser/spellchecker/spellcheck_factory.cc
@@ -6,11 +6,11 @@
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/spellchecker/spellcheck_service.h"
-#include "chrome/common/pref_names.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"
#include "components/prefs/pref_service.h"
+#include "components/spellcheck/browser/pref_names.h"
#include "components/user_prefs/user_prefs.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/render_process_host.h"
@@ -61,28 +61,29 @@ KeyedService* SpellcheckServiceFactory::BuildServiceInstanceFor(
// Instantiates Metrics object for spellchecking for use.
spellcheck->StartRecordingMetrics(
- prefs->GetBoolean(prefs::kEnableContinuousSpellcheck));
+ prefs->GetBoolean(spellcheck::prefs::kEnableContinuousSpellcheck));
return spellcheck;
}
void SpellcheckServiceFactory::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* user_prefs) {
- user_prefs->RegisterListPref(prefs::kSpellCheckDictionaries,
+ user_prefs->RegisterListPref(spellcheck::prefs::kSpellCheckDictionaries,
new base::ListValue);
// Continue registering kSpellCheckDictionary for preference migration.
// TODO(estade): IDS_SPELLCHECK_DICTIONARY should be an ASCII string.
user_prefs->RegisterStringPref(
- prefs::kSpellCheckDictionary,
+ spellcheck::prefs::kSpellCheckDictionary,
l10n_util::GetStringUTF8(IDS_SPELLCHECK_DICTIONARY));
- user_prefs->RegisterBooleanPref(prefs::kSpellCheckUseSpellingService, false);
+ user_prefs->RegisterBooleanPref(
+ spellcheck::prefs::kSpellCheckUseSpellingService, false);
#if defined(OS_IOS) || defined(OS_ANDROID)
uint32_t flags = PrefRegistry::NO_REGISTRATION_FLAGS;
#else
uint32_t flags = user_prefs::PrefRegistrySyncable::SYNCABLE_PREF;
#endif
- user_prefs->RegisterBooleanPref(prefs::kEnableContinuousSpellcheck, true,
- flags);
+ user_prefs->RegisterBooleanPref(
+ spellcheck::prefs::kEnableContinuousSpellcheck, true, flags);
}
content::BrowserContext* SpellcheckServiceFactory::GetBrowserContextToUse(

Powered by Google App Engine
This is Rietveld 408576698