diff options
Diffstat (limited to '')
-rw-r--r-- | third_party/libwebrtc/test/network/network_emulation.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/third_party/libwebrtc/test/network/network_emulation.h b/third_party/libwebrtc/test/network/network_emulation.h index dffabafa7c..20705197be 100644 --- a/third_party/libwebrtc/test/network/network_emulation.h +++ b/third_party/libwebrtc/test/network/network_emulation.h @@ -19,10 +19,12 @@ #include <utility> #include <vector> +#include "absl/base/nullability.h" #include "absl/types/optional.h" #include "api/array_view.h" #include "api/numerics/samples_stats_counter.h" #include "api/sequence_checker.h" +#include "api/task_queue/task_queue_base.h" #include "api/test/network_emulation/network_emulation_interfaces.h" #include "api/test/network_emulation_manager.h" #include "api/test/simulated_network.h" @@ -145,7 +147,7 @@ class EmulatedNetworkNodeStatsBuilder { class LinkEmulation : public EmulatedNetworkReceiverInterface { public: LinkEmulation(Clock* clock, - rtc::TaskQueue* task_queue, + absl::Nonnull<TaskQueueBase*> task_queue, std::unique_ptr<NetworkBehaviorInterface> network_behavior, EmulatedNetworkReceiverInterface* receiver, EmulatedNetworkStatsGatheringMode stats_gathering_mode) @@ -168,7 +170,7 @@ class LinkEmulation : public EmulatedNetworkReceiverInterface { void Process(Timestamp at_time) RTC_RUN_ON(task_queue_); Clock* const clock_; - rtc::TaskQueue* const task_queue_; + const absl::Nonnull<TaskQueueBase*> task_queue_; const std::unique_ptr<NetworkBehaviorInterface> network_behavior_ RTC_GUARDED_BY(task_queue_); EmulatedNetworkReceiverInterface* const receiver_; @@ -186,7 +188,7 @@ class LinkEmulation : public EmulatedNetworkReceiverInterface { // the packet will be silently dropped. class NetworkRouterNode : public EmulatedNetworkReceiverInterface { public: - explicit NetworkRouterNode(rtc::TaskQueue* task_queue); + explicit NetworkRouterNode(absl::Nonnull<TaskQueueBase*> task_queue); void OnPacketReceived(EmulatedIpPacket packet) override; void SetReceiver(const rtc::IPAddress& dest_ip, @@ -200,7 +202,7 @@ class NetworkRouterNode : public EmulatedNetworkReceiverInterface { void SetFilter(std::function<bool(const EmulatedIpPacket&)> filter); private: - rtc::TaskQueue* const task_queue_; + const absl::Nonnull<TaskQueueBase*> task_queue_; absl::optional<EmulatedNetworkReceiverInterface*> default_receiver_ RTC_GUARDED_BY(task_queue_); std::map<rtc::IPAddress, EmulatedNetworkReceiverInterface*> routing_ @@ -224,7 +226,7 @@ class EmulatedNetworkNode : public EmulatedNetworkReceiverInterface { // they are ready. EmulatedNetworkNode( Clock* clock, - rtc::TaskQueue* task_queue, + absl::Nonnull<TaskQueueBase*> task_queue, std::unique_ptr<NetworkBehaviorInterface> network_behavior, EmulatedNetworkStatsGatheringMode stats_gathering_mode); ~EmulatedNetworkNode() override; @@ -283,7 +285,7 @@ class EmulatedEndpointImpl : public EmulatedEndpoint { EmulatedEndpointImpl(const Options& options, bool is_enabled, - rtc::TaskQueue* task_queue, + absl::Nonnull<TaskQueueBase*> task_queue, Clock* clock); ~EmulatedEndpointImpl() override; @@ -341,7 +343,7 @@ class EmulatedEndpointImpl : public EmulatedEndpoint { const Options options_; bool is_enabled_ RTC_GUARDED_BY(enabled_state_checker_); Clock* const clock_; - rtc::TaskQueue* const task_queue_; + const absl::Nonnull<TaskQueueBase*> task_queue_; std::unique_ptr<rtc::Network> network_; NetworkRouterNode router_; |