Remove platform_thread from //rtc_base:rtc_base_approved public_deps

While the target has a restricted visibility, since it was in rtc_base_approved
public deps, a lot of targets were able to bypass the visibility check.
So we remove the visibility restrictions and use the dependency explicitely
everywhere instead.

Bug: webrtc:8603
Change-Id: I94a03fdf7f94c54ab72081a58dd648e2cca73d17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258944
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36566}
This commit is contained in:
Florent Castelli 2022-04-14 12:18:28 +02:00 committed by WebRTC LUCI CQ
parent b96902d33c
commit 45a0599978
16 changed files with 30 additions and 16 deletions

View File

@ -1194,6 +1194,7 @@ if (rtc_include_tests) {
":time_controller",
"../rtc_base:checks",
"../rtc_base:gunit_helpers",
"../rtc_base:platform_thread",
"../rtc_base:rtc_base_approved",
"../rtc_base:rtc_event",
"../rtc_base:rtc_task_queue",

View File

@ -566,6 +566,7 @@ if (rtc_include_tests) {
"../rtc_base:checks",
"../rtc_base:logging",
"../rtc_base:macromagic",
"../rtc_base:platform_thread",
"../rtc_base:rtc_base_approved",
"../rtc_base:rtc_event",
"../rtc_base:stringutils",

View File

@ -2110,6 +2110,7 @@ if (rtc_include_tests) {
"../../rtc_base:checks",
"../../rtc_base:ignore_wundef",
"../../rtc_base:macromagic",
"../../rtc_base:platform_thread",
"../../rtc_base:refcount",
"../../rtc_base:rtc_base_approved",
"../../rtc_base:rtc_base_tests_utils",

View File

@ -118,6 +118,7 @@ rtc_source_set("windows_core_audio_utility") {
"../../rtc_base:checks",
"../../rtc_base:logging",
"../../rtc_base:macromagic",
"../../rtc_base:platform_thread_types",
"../../rtc_base:rtc_base_approved",
"../../rtc_base:stringutils",
]
@ -158,6 +159,7 @@ rtc_source_set("audio_device_module_from_input_and_output") {
"../../rtc_base:checks",
"../../rtc_base:logging",
"../../rtc_base:macromagic",
"../../rtc_base:platform_thread",
"../../rtc_base:refcount",
"../../rtc_base:rtc_base_approved",
"../../rtc_base:safe_conversions",
@ -188,6 +190,7 @@ rtc_library("audio_device_impl") {
"../../rtc_base:checks",
"../../rtc_base:logging",
"../../rtc_base:macromagic",
"../../rtc_base:platform_thread",
"../../rtc_base:refcount",
"../../rtc_base:rtc_base_approved",
"../../rtc_base:rtc_event",

View File

@ -386,6 +386,7 @@ if (rtc_include_tests) {
"../../rtc_base:gtest_prod",
"../../rtc_base:ignore_wundef",
"../../rtc_base:macromagic",
"../../rtc_base:platform_thread",
"../../rtc_base:protobuf_utils",
"../../rtc_base:refcount",
"../../rtc_base:rtc_base_approved",
@ -488,6 +489,7 @@ if (rtc_include_tests) {
":audioproc_test_utils",
"../../api:array_view",
"../../rtc_base:atomicops",
"../../rtc_base:platform_thread",
"../../rtc_base:protobuf_utils",
"../../rtc_base:rtc_base_approved",
"../../rtc_base:rtc_event",

View File

@ -61,6 +61,7 @@ if (rtc_include_tests) {
"../../api:scoped_refptr",
"../../rtc_base:checks",
"../../rtc_base:logging",
"../../rtc_base:platform_thread",
"../../rtc_base:timeutils",
]
if (rtc_desktop_capture_supported) {

View File

@ -57,6 +57,7 @@ rtc_library("remote_bitrate_estimator") {
"../../rtc_base:checks",
"../../rtc_base:logging",
"../../rtc_base:macromagic",
"../../rtc_base:platform_thread",
"../../rtc_base:rtc_base_approved",
"../../rtc_base:rtc_numerics",
"../../rtc_base:safe_minmax",

View File

@ -36,6 +36,7 @@ rtc_library("utility") {
"../../common_audio",
"../../rtc_base:checks",
"../../rtc_base:logging",
"../../rtc_base:platform_thread",
"../../rtc_base:rtc_base_approved",
"../../rtc_base:rtc_event",
"../../rtc_base:timeutils",

View File

@ -55,6 +55,7 @@ if (!build_with_chromium) {
"../../rtc_base:checks",
"../../rtc_base:logging",
"../../rtc_base:macromagic",
"../../rtc_base:platform_thread",
"../../rtc_base:refcount",
"../../rtc_base:rtc_base_approved",
"../../rtc_base:stringutils",

View File

@ -1258,6 +1258,7 @@ if (rtc_include_tests) {
"../../media:rtc_media_base",
"../../rtc_base",
"../../rtc_base:checks",
"../../rtc_base:platform_thread",
"../../rtc_base:refcount",
"../../rtc_base:rtc_base_approved",
"../../rtc_base:rtc_base_tests_utils",

View File

@ -85,10 +85,10 @@ rtc_library("rtc_base_approved") {
":checks",
":logging",
":macromagic",
":platform_thread",
":platform_thread_types",
":refcount",
":rtc_event",
":rtc_task_queue",
":safe_compare",
":safe_conversions",
":stringutils",
":timeutils",
@ -100,7 +100,6 @@ rtc_library("rtc_base_approved") {
"system:arch",
"system:no_unique_address",
"system:rtc_export",
"third_party/base64",
]
absl_deps = [
"//third_party/abseil-cpp/absl/base:core_headers",
@ -179,11 +178,6 @@ rtc_library("rtc_base_approved") {
if (is_android) {
libs = [ "log" ]
}
public_deps += [ # no-presubmit-check TODO(webrtc:8603)
":platform_thread",
":platform_thread_types",
]
}
rtc_source_set("macromagic") {
@ -232,14 +226,6 @@ rtc_library("criticalsection") {
}
rtc_library("platform_thread") {
visibility = [
":rtc_base_approved",
":rtc_task_queue_libevent",
":rtc_task_queue_stdlib",
":rtc_task_queue_win",
"../api:sequence_checker",
"synchronization:mutex",
]
sources = [
"platform_thread.cc",
"platform_thread.h",
@ -812,6 +798,7 @@ rtc_library("threading") {
":macromagic",
":network_constants",
":null_socket_server",
":platform_thread",
":platform_thread_types",
":refcount",
":rtc_base_approved",
@ -1342,6 +1329,7 @@ if (rtc_include_tests) {
":macromagic",
":net_helpers",
":null_socket_server",
":platform_thread",
":rtc_base",
":rtc_base_tests_utils",
":socket",
@ -1424,6 +1412,7 @@ if (rtc_include_tests) {
":logging",
":macromagic",
":null_socket_server",
":platform_thread",
":rate_limiter",
":refcount",
":rtc_base",

View File

@ -87,6 +87,7 @@ if (rtc_include_tests) {
":yield_policy",
"..:checks",
"..:macromagic",
"..:platform_thread",
"..:rtc_base",
"..:rtc_event",
"..:threading",

View File

@ -1210,6 +1210,7 @@ if (current_os == "linux" || is_android) {
"../../rtc_base:checks",
"../../rtc_base:logging",
"../../rtc_base:macromagic",
"../../rtc_base:platform_thread",
"../../rtc_base:rtc_base_approved",
"../../rtc_base:timeutils",
"../../system_wrappers:field_trial",
@ -1269,6 +1270,7 @@ if (current_os == "linux" || is_android) {
"../../rtc_base:checks",
"../../rtc_base:logging",
"../../rtc_base:macromagic",
"../../rtc_base:platform_thread",
"../../rtc_base:rtc_base_approved",
"../../rtc_base:timeutils",
]
@ -1650,6 +1652,7 @@ if (is_android) {
"../../rtc_base:ip_address",
"../../rtc_base:logging",
"../../rtc_base:macromagic",
"../../rtc_base:platform_thread",
"../../rtc_base:rtc_base",
"../../rtc_base:rtc_event",
"../../rtc_base:stringutils",

View File

@ -671,6 +671,7 @@ if (!build_with_chromium) {
"../../../rtc_base:checks",
"../../../rtc_base:criticalsection",
"../../../rtc_base:logging",
"../../../rtc_base:platform_thread",
"../../../rtc_base:rtc_base_approved",
"../../../rtc_base:rtc_event",
"../../../rtc_base:rtc_numerics",
@ -710,6 +711,7 @@ if (!build_with_chromium) {
"../../../api/video:video_frame",
"../../../common_video",
"../../../rtc_base:checks",
"../../../rtc_base:platform_thread",
"../../../rtc_base:rtc_base_approved",
"../../../rtc_base:rtc_base_tests_utils",
"../../../rtc_base:rtc_event",

View File

@ -37,6 +37,7 @@ rtc_library("time_controller") {
"../../rtc_base",
"../../rtc_base:checks",
"../../rtc_base:null_socket_server",
"../../rtc_base:platform_thread_types",
"../../rtc_base:rtc_base_tests_utils",
"../../rtc_base:rtc_event",
"../../rtc_base/synchronization:mutex",

View File

@ -113,6 +113,7 @@ rtc_library("video") {
"../rtc_base:checks",
"../rtc_base:logging",
"../rtc_base:macromagic",
"../rtc_base:platform_thread",
"../rtc_base:rate_limiter",
"../rtc_base:rtc_base",
"../rtc_base:rtc_base_approved",
@ -206,6 +207,7 @@ rtc_source_set("video_legacy") {
"../rtc_base:checks",
"../rtc_base:logging",
"../rtc_base:macromagic",
"../rtc_base:platform_thread",
"../rtc_base:rtc_base_approved",
"../rtc_base:rtc_numerics",
"../rtc_base:rtc_task_queue",
@ -250,6 +252,7 @@ rtc_library("video_stream_decoder_impl") {
"../modules/video_coding",
"../modules/video_coding:timing",
"../rtc_base:logging",
"../rtc_base:platform_thread",
"../rtc_base:rtc_base_approved",
"../rtc_base:rtc_task_queue",
"../rtc_base:timeutils",
@ -571,6 +574,7 @@ if (rtc_include_tests) {
"../modules/video_coding:webrtc_vp8",
"../modules/video_coding:webrtc_vp9",
"../rtc_base:macromagic",
"../rtc_base:platform_thread",
"../rtc_base:rtc_base_approved",
"../rtc_base:rtc_base_tests_utils",
"../rtc_base:rtc_event",
@ -906,6 +910,7 @@ if (rtc_include_tests) {
"../rtc_base:gunit_helpers",
"../rtc_base:logging",
"../rtc_base:macromagic",
"../rtc_base:platform_thread",
"../rtc_base:rate_limiter",
"../rtc_base:refcount",
"../rtc_base:rtc_base_approved",