chore: disable default async spellchecker on Windows (#29705)

* chore: disable default async spellchecker on Windows

* chore: disable kWinRetrieveSuggestionsOnlyOnDemand in feature list

Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
Co-authored-by: VerteDinde <khammond@slack-corp.com>
This commit is contained in:
trop[bot]
2021-06-15 14:09:47 -04:00
committed by GitHub
parent f1fcdbd4a0
commit 2fcd000f0c

View File

@@ -10,6 +10,7 @@
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/metrics/field_trial.h"
#include "components/spellcheck/common/spellcheck_features.h"
#include "content/public/common/content_features.h"
#include "electron/buildflags/buildflags.h"
#include "media/base/media_switches.h"
@@ -41,6 +42,13 @@ void InitializeFeatureList() {
#if !BUILDFLAG(ENABLE_PICTURE_IN_PICTURE)
disable_features += std::string(",") + media::kPictureInPicture.name;
#endif
#if defined(OS_WIN)
// Disable async spellchecker suggestions for Windows, which causes
// an empty suggestions list to be returned
disable_features +=
std::string(",") + spellcheck::kWinRetrieveSuggestionsOnlyOnDemand.name;
#endif
base::FeatureList::InitializeInstance(enable_features, disable_features);
}