IWYU p2p/client and p2p/stun_prober

BUG=webrtc:42226242

Change-Id: I2940154d363fe9fba9fb15d9133714e30fdcf219
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/379121
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#44039}
diff --git a/p2p/BUILD.gn b/p2p/BUILD.gn
index 4b45e4d..1277c71 100644
--- a/p2p/BUILD.gn
+++ b/p2p/BUILD.gn
@@ -112,24 +112,34 @@
     ":basic_packet_socket_factory",
     ":port",
     ":port_allocator",
+    ":port_interface",
     ":relay_port_factory_interface",
     ":stun_port",
     ":tcp_port",
     ":turn_port",
     ":turn_port_factory",
     ":udp_port",
+    "../api:candidate",
     "../api:field_trials_view",
+    "../api:packet_socket_factory",
+    "../api:sequence_checker",
     "../api:turn_customizer",
     "../api/task_queue:pending_task_safety_flag",
+    "../api/transport:enums",
     "../api/transport:field_trial_based_config",
     "../api/units:time_delta",
+    "../rtc_base:async_packet_socket",
     "../rtc_base:checks",
     "../rtc_base:crypto_random",
     "../rtc_base:event_tracer",
+    "../rtc_base:ip_address",
     "../rtc_base:logging",
     "../rtc_base:macromagic",
+    "../rtc_base:net_helper",
+    "../rtc_base:net_helpers",
     "../rtc_base:network",
     "../rtc_base:network_constants",
+    "../rtc_base:socket_address",
     "../rtc_base:stringutils",
     "../rtc_base:threading",
     "../rtc_base/experiments:field_trial_parser",
@@ -138,6 +148,7 @@
     "../rtc_base/system:rtc_export",
     "../system_wrappers:metrics",
     "//third_party/abseil-cpp/absl/algorithm:container",
+    "//third_party/abseil-cpp/absl/base:core_headers",
     "//third_party/abseil-cpp/absl/memory",
     "//third_party/abseil-cpp/absl/strings:string_view",
   ]
@@ -1229,6 +1240,7 @@
     "../rtc_base:checks",
     "../rtc_base:ip_address",
     "../rtc_base:logging",
+    "../rtc_base:net_helpers",
     "../rtc_base:network",
     "../rtc_base:socket_address",
     "../rtc_base:ssl",
@@ -1236,6 +1248,7 @@
     "../rtc_base:timeutils",
     "../rtc_base/network:received_packet",
     "../rtc_base/system:rtc_export",
+    "../rtc_base/third_party/sigslot",
   ]
 }
 
@@ -1251,8 +1264,11 @@
       "../rtc_base:checks",
       "../rtc_base:gunit_helpers",
       "../rtc_base:ip_address",
+      "../rtc_base:network",
       "../rtc_base:rtc_base_tests_utils",
+      "../rtc_base:socket_address",
       "../rtc_base:ssl_adapter",
+      "../rtc_base:threading",
       "../test:test_support",
       "//testing/gtest",
     ]
diff --git a/p2p/client/basic_port_allocator.cc b/p2p/client/basic_port_allocator.cc
index 75213df..9c6c198 100644
--- a/p2p/client/basic_port_allocator.cc
+++ b/p2p/client/basic_port_allocator.cc
@@ -11,8 +11,11 @@
 #include "p2p/client/basic_port_allocator.h"
 
 #include <algorithm>
+#include <cstddef>
+#include <cstdint>
 #include <functional>
 #include <memory>
+#include <optional>
 #include <set>
 #include <string>
 #include <utility>
@@ -21,23 +24,35 @@
 #include "absl/algorithm/container.h"
 #include "absl/memory/memory.h"
 #include "absl/strings/string_view.h"
+#include "api/candidate.h"
+#include "api/field_trials_view.h"
+#include "api/packet_socket_factory.h"
+#include "api/sequence_checker.h"
 #include "api/task_queue/pending_task_safety_flag.h"
-#include "api/transport/field_trial_based_config.h"
+#include "api/transport/enums.h"
 #include "api/units/time_delta.h"
-#include "p2p/base/basic_packet_socket_factory.h"
 #include "p2p/base/port.h"
+#include "p2p/base/port_allocator.h"
+#include "p2p/base/port_interface.h"
 #include "p2p/base/stun_port.h"
 #include "p2p/base/tcp_port.h"
 #include "p2p/base/turn_port.h"
-#include "p2p/base/udp_port.h"
+#include "p2p/client/relay_port_factory_interface.h"
+#include "p2p/client/turn_port_factory.h"
+#include "rtc_base/async_packet_socket.h"
 #include "rtc_base/checks.h"
 #include "rtc_base/crypto_random.h"
-#include "rtc_base/experiments/field_trial_parser.h"
+#include "rtc_base/ip_address.h"
 #include "rtc_base/logging.h"
+#include "rtc_base/net_helper.h"
+#include "rtc_base/net_helpers.h"
+#include "rtc_base/network.h"
+#include "rtc_base/network/received_packet.h"
 #include "rtc_base/network_constants.h"
+#include "rtc_base/socket_address.h"
 #include "rtc_base/strings/string_builder.h"
+#include "rtc_base/thread.h"
 #include "rtc_base/trace_event.h"
-#include "system_wrappers/include/metrics.h"
 
 namespace cricket {
 namespace {
diff --git a/p2p/client/basic_port_allocator.h b/p2p/client/basic_port_allocator.h
index 197d4b1..0957c3d 100644
--- a/p2p/client/basic_port_allocator.h
+++ b/p2p/client/basic_port_allocator.h
@@ -11,21 +11,31 @@
 #ifndef P2P_CLIENT_BASIC_PORT_ALLOCATOR_H_
 #define P2P_CLIENT_BASIC_PORT_ALLOCATOR_H_
 
+#include <cstdint>
+#include <functional>
 #include <memory>
+#include <optional>
 #include <string>
 #include <vector>
 
+#include "absl/base/attributes.h"
 #include "absl/strings/string_view.h"
+#include "api/candidate.h"
 #include "api/field_trials_view.h"
 #include "api/task_queue/pending_task_safety_flag.h"
+#include "api/transport/enums.h"
+#include "api/transport/field_trial_based_config.h"
 #include "api/turn_customizer.h"
+#include "p2p/base/port.h"
 #include "p2p/base/port_allocator.h"
+#include "p2p/base/port_interface.h"
 #include "p2p/client/relay_port_factory_interface.h"
-#include "p2p/client/turn_port_factory.h"
 #include "rtc_base/checks.h"
+#include "rtc_base/ip_address.h"
 #include "rtc_base/memory/always_valid_pointer.h"
 #include "rtc_base/network.h"
 #include "rtc_base/network/received_packet.h"
+#include "rtc_base/socket_address.h"
 #include "rtc_base/system/rtc_export.h"
 #include "rtc_base/thread.h"
 #include "rtc_base/thread_annotations.h"
diff --git a/p2p/client/relay_port_factory_interface.h b/p2p/client/relay_port_factory_interface.h
index edfca36..153eb4a 100644
--- a/p2p/client/relay_port_factory_interface.h
+++ b/p2p/client/relay_port_factory_interface.h
@@ -15,7 +15,6 @@
 #include <string>
 
 #include "p2p/base/port_interface.h"
-#include "rtc_base/ref_count.h"
 
 namespace rtc {
 class AsyncPacketSocket;
diff --git a/p2p/client/turn_port_factory.cc b/p2p/client/turn_port_factory.cc
index 555387d..a7e2632 100644
--- a/p2p/client/turn_port_factory.cc
+++ b/p2p/client/turn_port_factory.cc
@@ -13,8 +13,11 @@
 #include <memory>
 #include <utility>
 
+#include "p2p/base/port.h"
 #include "p2p/base/port_allocator.h"
 #include "p2p/base/turn_port.h"
+#include "p2p/client/relay_port_factory_interface.h"
+#include "rtc_base/async_packet_socket.h"
 
 namespace cricket {
 
diff --git a/p2p/stunprober/stun_prober.cc b/p2p/stunprober/stun_prober.cc
index d130d78..8bf8dbb 100644
--- a/p2p/stunprober/stun_prober.cc
+++ b/p2p/stunprober/stun_prober.cc
@@ -10,21 +10,31 @@
 
 #include "p2p/stunprober/stun_prober.h"
 
+#include <cstddef>
 #include <cstdint>
 #include <map>
 #include <memory>
 #include <set>
 #include <string>
 #include <utility>
+#include <vector>
 
 #include "api/array_view.h"
+#include "api/async_dns_resolver.h"
 #include "api/packet_socket_factory.h"
+#include "api/sequence_checker.h"
 #include "api/task_queue/pending_task_safety_flag.h"
 #include "api/transport/stun.h"
 #include "api/units/time_delta.h"
 #include "rtc_base/async_packet_socket.h"
+#include "rtc_base/byte_buffer.h"
 #include "rtc_base/checks.h"
+#include "rtc_base/ip_address.h"
+#include "rtc_base/net_helpers.h"
+#include "rtc_base/network.h"
 #include "rtc_base/network/received_packet.h"
+#include "rtc_base/socket_address.h"
+#include "rtc_base/third_party/sigslot/sigslot.h"
 #include "rtc_base/thread.h"
 #include "rtc_base/time_utils.h"
 
diff --git a/p2p/stunprober/stun_prober.h b/p2p/stunprober/stun_prober.h
index 07f3a17..e368c31 100644
--- a/p2p/stunprober/stun_prober.h
+++ b/p2p/stunprober/stun_prober.h
@@ -11,6 +11,9 @@
 #ifndef P2P_STUNPROBER_STUN_PROBER_H_
 #define P2P_STUNPROBER_STUN_PROBER_H_
 
+#include <cstddef>
+#include <cstdint>
+#include <functional>
 #include <memory>
 #include <set>
 #include <string>
@@ -22,6 +25,7 @@
 #include "rtc_base/network.h"
 #include "rtc_base/socket_address.h"
 #include "rtc_base/system/rtc_export.h"
+#include "rtc_base/third_party/sigslot/sigslot.h"
 #include "rtc_base/thread.h"
 
 namespace rtc {
diff --git a/p2p/stunprober/stun_prober_unittest.cc b/p2p/stunprober/stun_prober_unittest.cc
index 3167ad2..5022575 100644
--- a/p2p/stunprober/stun_prober_unittest.cc
+++ b/p2p/stunprober/stun_prober_unittest.cc
@@ -13,13 +13,19 @@
 #include <stdint.h>
 
 #include <memory>
+#include <set>
+#include <string>
 #include <utility>
+#include <vector>
 
 #include "p2p/base/basic_packet_socket_factory.h"
 #include "p2p/test/test_stun_server.h"
 #include "rtc_base/gunit.h"
 #include "rtc_base/ip_address.h"
+#include "rtc_base/network.h"
+#include "rtc_base/socket_address.h"
 #include "rtc_base/ssl_adapter.h"
+#include "rtc_base/thread.h"
 #include "rtc_base/virtual_socket_server.h"
 #include "test/gtest.h"