Commit 1cad9556 authored by Etienne Pierre-doray's avatar Etienne Pierre-doray Committed by Commit Bot

[TaskScheduler]: Update ScopedAllowBaseSyncPrimitives friend list.

Preparing work for migrating ThreadRestrictions::ScopedAllowWait to
ScopedAllowBaseSyncPrimitives.
This CL updates the friendlist for ScopedAllowBaseSyncPrimitives and
ScopedAllowBaseSyncPrimitivesWithoutBlockingScope.
Some cases might need to be adjusted if it was labeled wrong, but we can assume
that most cases are correct. This saves us from updating this file for each
cases.

Bug: 766678
Change-Id: Ie11bca133f7664355425cfaefcffb4acc0373731
Reviewed-on: https://chromium-review.googlesource.com/c/1324100
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: default avatarFrançois Doray <fdoray@chromium.org>
Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606250}
parent ba90fc90
......@@ -339,20 +339,40 @@ class BASE_EXPORT ScopedAllowBaseSyncPrimitives {
ScopedAllowBaseSyncPrimitivesResetsState);
FRIEND_TEST_ALL_PREFIXES(ThreadRestrictionsTest,
ScopedAllowBaseSyncPrimitivesWithBlockingDisallowed);
// Allowed usage:
friend class ::BrowserProcessImpl;
friend class SimpleThread;
friend class android::JavaHandlerThread;
friend class android_webview::AwFormDatabaseService;
friend class android_webview::CookieManager;
friend class base::GetAppOutputScopedAllowBaseSyncPrimitives;
friend class base::StackSamplingProfiler;
friend class content::BrowserMainLoop;
friend class content::BrowserProcessSubThread;
friend class content::ScopedAllowWaitForDebugURL;
friend class content::ServiceWorkerSubresourceLoader;
friend class content::SessionStorageDatabase;
friend class functions::ExecScriptScopedAllowBaseSyncPrimitives;
friend class internal::TaskTracker;
friend class leveldb::LevelDBMojoProxy;
friend class media::BlockingUrlProtocol;
friend class mojo::core::ScopedIPCSupport;
friend class net::MultiThreadedCertVerifierScopedAllowBaseSyncPrimitives;
friend class remoting::AutoThread;
friend class rlz_lib::FinancialPing;
friend class shell_integration_linux::
LaunchXdgUtilityScopedAllowBaseSyncPrimitives;
friend class webrtc::DesktopConfigurationMonitor;
friend class content::ServiceWorkerSubresourceLoader;
friend class blink::VideoFrameResourceProvider;
// Usage that should be fixed:
friend class ::NativeBackendKWallet; // http://crbug.com/125331
friend class ::chromeos::BlockingMethodCaller; // http://crbug.com/125360
friend class ::chromeos::system::
StatisticsProviderImpl; // http://crbug.com/125385
friend class content::TextInputClientMac; // http://crbug.com/121917
friend class blink::VideoFrameResourceProvider; // http://crbug.com/878070
friend class dbus::Bus; // http://crbug.com/125222
ScopedAllowBaseSyncPrimitives() EMPTY_BODY_IF_DCHECK_IS_OFF;
~ScopedAllowBaseSyncPrimitives() EMPTY_BODY_IF_DCHECK_IS_OFF;
......@@ -374,15 +394,32 @@ class BASE_EXPORT ScopedAllowBaseSyncPrimitivesOutsideBlockingScope {
FRIEND_TEST_ALL_PREFIXES(
ThreadRestrictionsTest,
ScopedAllowBaseSyncPrimitivesOutsideBlockingScopeResetsState);
// Allowed usage:
friend class ::KeyStorageLinux;
friend class Thread;
friend class base::MessageLoopImpl;
friend class content::SynchronousCompositor;
friend class content::SynchronousCompositorHost;
friend class content::SynchronousCompositorSyncCallBridge;
friend class midi::TaskService; // https://crbug.com/796830
friend class mojo::SyncCallRestrictions;
friend class viz::HostGpuMemoryBufferManager;
// Usage that should be fixed:
friend class cc::CompletionEvent; // http://crbug.com/902653
friend class cc::SingleThreadTaskGraphRunner; // http://crbug.com/902823
friend class content::
BrowserGpuChannelHostFactory; // http://crbug.com/125248
friend class content::CategorizedWorkerPool; // http://crbug.com/902823
friend class disk_cache::BackendImpl; // http://crbug.com/74623
friend class disk_cache::InFlightIO; // http://crbug.com/74623
friend class gpu::GpuChannelHost; // http://crbug.com/125264
friend class midi::TaskService; // https://crbug.com/796830
friend class net::NetworkChangeNotifierMac; // http://crbug.com/125097
friend class net::internal::AddressTrackerLinux; // http://crbug.com/125097
// Not used in production yet, https://crbug.com/844078.
friend class service_manager::ServiceProcessLauncher;
friend class viz::HostGpuMemoryBufferManager;
friend class ui::WindowResizeHelperMac; // http://crbug.com/902829
ScopedAllowBaseSyncPrimitivesOutsideBlockingScope()
EMPTY_BODY_IF_DCHECK_IS_OFF;
......@@ -479,6 +516,7 @@ class BASE_EXPORT ThreadRestrictions {
#endif
private:
// TODO(etiennep): Remove friendship for ScopedAllowWait.
// DO NOT ADD ANY OTHER FRIEND STATEMENTS.
// BEGIN ALLOWED USAGE.
friend class android_webview::AwFormDatabaseService;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment