From d119b9e210ba97221f8ff88588562152045495ef Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Thu, 14 Apr 2022 13:23:51 +0200 Subject: [PATCH] Move zero_memory out of rtc_base_approved Bug: webrtc:9838 Change-Id: I2d1507354abf208947ac299ab41abe3cfa2b4274 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258767 Reviewed-by: Harald Alvestrand Commit-Queue: Florent Castelli Cr-Commit-Position: refs/heads/main@{#36585} --- pc/BUILD.gn | 3 +++ rtc_base/BUILD.gn | 30 +++++++++++++++++++++++++++--- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/pc/BUILD.gn b/pc/BUILD.gn index 0704abee19..60a4ca1a58 100644 --- a/pc/BUILD.gn +++ b/pc/BUILD.gn @@ -198,6 +198,7 @@ rtc_source_set("external_hmac") { deps = [ "../rtc_base:logging", "../rtc_base:rtc_base_approved", + "../rtc_base:zero_memory", ] if (rtc_build_libsrtp) { deps += [ "//third_party/libsrtp" ] @@ -563,6 +564,7 @@ rtc_source_set("srtp_filter") { "../rtc_base", "../rtc_base:logging", "../rtc_base:rtc_base_approved", + "../rtc_base:zero_memory", "../rtc_base/third_party/base64", ] absl_deps = [ @@ -622,6 +624,7 @@ rtc_source_set("srtp_transport") { "../rtc_base:logging", "../rtc_base:rtc_base_approved", "../rtc_base:safe_conversions", + "../rtc_base:zero_memory", "../rtc_base/third_party/base64", "../rtc_base/third_party/sigslot", ] diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn index 1073d81dd8..69edda43d9 100644 --- a/rtc_base/BUILD.gn +++ b/rtc_base/BUILD.gn @@ -95,9 +95,12 @@ rtc_library("rtc_base_approved") { ":safe_conversions", ":stringutils", ":strong_alias", + ":swap_queue", ":timestamp_aligner", ":timeutils", ":type_traits", + ":zero_memory", + ":zero_memory", "../api:array_view", "../api:scoped_refptr", "../api:sequence_checker", @@ -143,11 +146,10 @@ rtc_library("rtc_base_approved") { "rate_tracker.cc", "rate_tracker.h", "strong_alias.h", # Transitional, use :strong_alias - "swap_queue.h", + "swap_queue.h", # Transitional, use :swap_queue "timestamp_aligner.h", # Transitional, use :timestamp_aligner "trace_event.h", - "zero_memory.cc", - "zero_memory.h", + "zero_memory.h", # Transitional, use :zero_memory ] if (is_win) { @@ -199,6 +201,13 @@ rtc_source_set("strong_alias") { sources = [ "strong_alias.h" ] } +rtc_source_set("swap_queue") { + visibility = [ "*" ] + sources = [ "swap_queue.h" ] + deps = [ ":checks" ] + absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ] +} + rtc_source_set("macromagic") { sources = [ "arraysize.h", @@ -243,6 +252,18 @@ rtc_library("timestamp_aligner") { ] } +rtc_library("zero_memory") { + visibility = [ "*" ] + sources = [ + "zero_memory.cc", + "zero_memory.h", + ] + deps = [ + ":checks", + "../api:array_view", + ] +} + rtc_library("platform_thread_types") { sources = [ "platform_thread_types.cc", @@ -996,6 +1017,7 @@ rtc_library("rtc_base") { ":stringutils", ":threading", ":timeutils", + ":zero_memory", "../api:array_view", "../api:field_trials_view", "../api:function_view", @@ -1491,10 +1513,12 @@ if (rtc_include_tests) { ":socket_server", ":stringutils", ":strong_alias", + ":swap_queue", ":testclient", ":threading", ":timestamp_aligner", ":timeutils", + ":zero_memory", "../api:array_view", "../api:scoped_refptr", "../api/numerics",