chore_introduce_blocking_api_for_electron.patch 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: deepak1556 <[email protected]>
  3. Date: Tue, 15 Nov 2022 21:45:28 +0900
  4. Subject: chore: introduce blocking api for //electron
  5. This patch comes after Chromium removed the ScopedAllowIO API in favor
  6. of explicitly adding ScopedAllowBlocking calls as friends.
  7. diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h
  8. index 56ddbc2d4fa336bcdbe9aaacd4bf8bbaa3573239..7859ce547dc00c2842fe1aa3699cf20e0f597937 100644
  9. --- a/base/threading/thread_restrictions.h
  10. +++ b/base/threading/thread_restrictions.h
  11. @@ -132,6 +132,7 @@ class KeyStorageLinux;
  12. class NativeBackendKWallet;
  13. class NativeDesktopMediaList;
  14. class PartnerBookmarksReader;
  15. +class ProcessSingleton;
  16. class Profile;
  17. class ProfileImpl;
  18. class ScopedAllowBlockingForProfile;
  19. @@ -278,6 +279,9 @@ class BackendImpl;
  20. class InFlightIO;
  21. bool CleanupDirectorySync(const base::FilePath&);
  22. } // namespace disk_cache
  23. +namespace electron {
  24. +class ScopedAllowBlockingForElectron;
  25. +} // namespace electron
  26. namespace enterprise_connectors {
  27. class LinuxKeyRotationCommand;
  28. } // namespace enterprise_connectors
  29. @@ -575,6 +579,7 @@ class BASE_EXPORT ScopedAllowBlocking {
  30. friend class ::DesktopNotificationBalloon;
  31. friend class ::FirefoxProfileLock;
  32. friend class ::GaiaConfig;
  33. + friend class ::ProcessSingleton;
  34. friend class ::ProfileImpl;
  35. friend class ::ScopedAllowBlockingForProfile;
  36. friend class ::StartupTabProviderImpl;
  37. @@ -615,6 +620,7 @@ class BASE_EXPORT ScopedAllowBlocking {
  38. friend class crypto::ScopedAllowBlockingForNSS; // http://crbug.com/59847
  39. friend class drive::FakeDriveService;
  40. friend class extensions::DesktopAndroidExtensionSystem;
  41. + friend class electron::ScopedAllowBlockingForElectron;
  42. friend class extensions::InstalledLoader;
  43. friend class extensions::UnpackedInstaller;
  44. friend class font_service::internal::MappedFontFile;