remove_usage_of_incognito_apis_in_the_spellchecker.patch 1.1 KB

12345678910111213141516171819202122232425
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Samuel Attard <[email protected]>
  3. Date: Wed, 23 Oct 2019 11:43:58 -0700
  4. Subject: remove usage of incognito APIs in the spellchecker
  5. chrome::GetBrowserContextRedirectedInIncognito is not available in
  6. Electron nor do we want it to be. We could potentially upstream a
  7. change to move more of //chrome spellchecker logic into //components so
  8. that we can further separate our dependency from //chrome.
  9. diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc
  10. index 9d238b5de516a672d5b99f2f66316a205fc705a7..7c3b6a69acb16186add5d467dbc22360d90d46d4 100644
  11. --- a/chrome/browser/spellchecker/spellcheck_factory.cc
  12. +++ b/chrome/browser/spellchecker/spellcheck_factory.cc
  13. @@ -72,7 +72,10 @@ void SpellcheckServiceFactory::RegisterProfilePrefs(
  14. content::BrowserContext* SpellcheckServiceFactory::GetBrowserContextToUse(
  15. content::BrowserContext* context) const {
  16. + return context;
  17. +#if 0
  18. return chrome::GetBrowserContextRedirectedInIncognito(context);
  19. +#endif
  20. }
  21. bool SpellcheckServiceFactory::ServiceIsNULLWhileTesting() const {