summaryrefslogtreecommitdiff
path: root/chromium/components/spellcheck/common
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/components/spellcheck/common')
-rw-r--r--chromium/components/spellcheck/common/BUILD.gn4
-rw-r--r--chromium/components/spellcheck/common/spellcheck.mojom2
-rw-r--r--chromium/components/spellcheck/common/spellcheck_features.cc17
-rw-r--r--chromium/components/spellcheck/common/spellcheck_features.h25
4 files changed, 24 insertions, 24 deletions
diff --git a/chromium/components/spellcheck/common/BUILD.gn b/chromium/components/spellcheck/common/BUILD.gn
index 77e39c803d7..a7b429c323e 100644
--- a/chromium/components/spellcheck/common/BUILD.gn
+++ b/chromium/components/spellcheck/common/BUILD.gn
@@ -54,8 +54,4 @@ mojom("interfaces") {
if (use_renderer_spellchecker) {
enabled_features += [ "USE_RENDERER_SPELLCHECKER" ]
}
-
- if (use_win_hybrid_spellchecker) {
- enabled_features += [ "USE_WIN_HYBRID_SPELLCHECKER" ]
- }
}
diff --git a/chromium/components/spellcheck/common/spellcheck.mojom b/chromium/components/spellcheck/common/spellcheck.mojom
index f5f5b8966af..184169ca5ed 100644
--- a/chromium/components/spellcheck/common/spellcheck.mojom
+++ b/chromium/components/spellcheck/common/spellcheck.mojom
@@ -77,7 +77,7 @@ interface SpellCheckHost {
// Returns a list of suggestions for each spellcheck language for a given word
// with a platform-specific spell checker.
- [EnableIf=USE_WIN_HYBRID_SPELLCHECKER, Sync]
+ [EnableIf=is_win, Sync]
GetPerLanguageSuggestions(mojo_base.mojom.String16 word) =>
(array<array<mojo_base.mojom.String16>> suggestions);
};
diff --git a/chromium/components/spellcheck/common/spellcheck_features.cc b/chromium/components/spellcheck/common/spellcheck_features.cc
index 0732801e2f2..445941b1a2a 100644
--- a/chromium/components/spellcheck/common/spellcheck_features.cc
+++ b/chromium/components/spellcheck/common/spellcheck_features.cc
@@ -13,11 +13,6 @@ namespace spellcheck {
#if BUILDFLAG(ENABLE_SPELLCHECK)
-#if BUILDFLAG(USE_WIN_HYBRID_SPELLCHECKER)
-const base::Feature kWinUseHybridSpellChecker{
- "WinUseHybridSpellChecker", base::FEATURE_DISABLED_BY_DEFAULT};
-#endif // BUILDFLAG(USE_WIN_HYBRID_SPELLCHECKER)
-
bool UseBrowserSpellChecker() {
#if !BUILDFLAG(USE_BROWSER_SPELLCHECKER)
return false;
@@ -33,19 +28,13 @@ bool UseBrowserSpellChecker() {
const base::Feature kWinUseBrowserSpellChecker{
"WinUseBrowserSpellChecker", base::FEATURE_DISABLED_BY_DEFAULT};
+const base::Feature kWinDelaySpellcheckServiceInit{
+ "WinDelaySpellcheckServiceInit", base::FEATURE_DISABLED_BY_DEFAULT};
+
bool WindowsVersionSupportsSpellchecker() {
return base::win::GetVersion() > base::win::Version::WIN7 &&
base::win::GetVersion() < base::win::Version::WIN_LAST;
}
-
-bool UseWinHybridSpellChecker() {
-#if BUILDFLAG(USE_WIN_HYBRID_SPELLCHECKER)
- return base::FeatureList::IsEnabled(spellcheck::kWinUseHybridSpellChecker) &&
- UseBrowserSpellChecker();
-#else
- return false;
-#endif
-}
#endif // defined(OS_WIN)
#if defined(OS_ANDROID)
diff --git a/chromium/components/spellcheck/common/spellcheck_features.h b/chromium/components/spellcheck/common/spellcheck_features.h
index ed2936f88de..282bd74cbb8 100644
--- a/chromium/components/spellcheck/common/spellcheck_features.h
+++ b/chromium/components/spellcheck/common/spellcheck_features.h
@@ -13,17 +13,32 @@ namespace spellcheck {
#if BUILDFLAG(ENABLE_SPELLCHECK)
-#if BUILDFLAG(USE_WIN_HYBRID_SPELLCHECKER)
-extern const base::Feature kWinUseHybridSpellChecker;
-#endif // BUILDFLAG(USE_WIN_HYBRID_SPELLCHECKER)
-
bool UseBrowserSpellChecker();
#if defined(OS_WIN)
extern const base::Feature kWinUseBrowserSpellChecker;
+// If the kWinDelaySpellcheckServiceInit feature flag is enabled, don't
+// initialize the spellcheck dictionaries when the SpellcheckService is
+// instantiated. With this flag set: (1) Completing the initialization of the
+// spellcheck service is on-demand, invoked by calling
+// SpellcheckService::InitializeDictionaries with a callback to indicate when
+// the operation completes. (2) The call to create the spellcheck service in
+// ChromeBrowserMainParts::PreMainMessageLoopRunImpl will be skipped. Chromium
+// will still by default instantiate the spellcheck service on startup for
+// custom dictionary synchronization, but will not load Windows spellcheck
+// dictionaries. The command line for launching the browser with Windows hybrid
+// spellchecking enabled but no initialization of the spellcheck service is:
+// chrome
+// --enable-features=WinUseBrowserSpellChecker,WinDelaySpellcheckServiceInit
+// and if instantiation of the spellcheck service needs to be completely
+// disabled:
+// chrome
+// --enable-features=WinUseBrowserSpellChecker,WinDelaySpellcheckServiceInit
+// --disable-sync-types="Dictionary"
+extern const base::Feature kWinDelaySpellcheckServiceInit;
+
bool WindowsVersionSupportsSpellchecker();
-bool UseWinHybridSpellChecker();
#endif // defined(OS_WIN)
#if defined(OS_ANDROID)