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 <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36585}
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index 1073d81..69edda4 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -95,9 +95,12 @@
     ":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 @@
     "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 @@
   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("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 @@
     ":stringutils",
     ":threading",
     ":timeutils",
+    ":zero_memory",
     "../api:array_view",
     "../api:field_trials_view",
     "../api:function_view",
@@ -1491,10 +1513,12 @@
         ":socket_server",
         ":stringutils",
         ":strong_alias",
+        ":swap_queue",
         ":testclient",
         ":threading",
         ":timestamp_aligner",
         ":timeutils",
+        ":zero_memory",
         "../api:array_view",
         "../api:scoped_refptr",
         "../api/numerics",