fix_remove_profiles_from_spellcheck_service.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Calvin Watford <[email protected]>
  3. Date: Fri, 28 Apr 2023 17:06:30 -0600
  4. Subject: fix: remove profiles from spellcheck_service
  5. Electron doesn't support profiles.
  6. diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
  7. index 69c82dd102e7e746db68c6ab4768a40a5aeeff6e..7c37977249d465767c4fea5818c510f6b23571b1 100644
  8. --- a/chrome/browser/spellchecker/spellcheck_service.cc
  9. +++ b/chrome/browser/spellchecker/spellcheck_service.cc
  10. @@ -21,7 +21,6 @@
  11. #include "base/values.h"
  12. #include "build/build_config.h"
  13. #include "build/chromeos_buildflags.h"
  14. -#include "chrome/browser/profiles/profile.h"
  15. #include "chrome/browser/spellchecker/spellcheck_factory.h"
  16. #include "chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h"
  17. #include "components/language/core/browser/pref_names.h"
  18. @@ -67,6 +66,7 @@ SpellcheckService::SpellCheckerBinder& GetSpellCheckerBinderOverride() {
  19. // Only record spelling-configuration metrics for profiles in which the user
  20. // can configure spelling.
  21. bool RecordSpellingConfigurationMetrics(content::BrowserContext* context) {
  22. +#if 0
  23. Profile* profile = Profile::FromBrowserContext(context);
  24. #if BUILDFLAG(IS_CHROMEOS_ASH)
  25. // ChromeOS creates various unusual profiles (login, lock screen...) which
  26. @@ -77,6 +77,8 @@ bool RecordSpellingConfigurationMetrics(content::BrowserContext* context) {
  27. }
  28. #endif
  29. return profile->IsRegularProfile();
  30. +#endif
  31. + return true;
  32. }
  33. } // namespace