Cleanup in NetworkEmulationManagerImpl.
Bug: webrtc:9883 Change-Id: I845ecd66ceda9eb8c144e4c10ff374c050413a04 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133344 Reviewed-by: Artem Titov <titovartem@webrtc.org> Commit-Queue: Sebastian Jansson <srte@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27664}
This commit is contained in:
parent
cf96e0f87d
commit
aa274d0287
@ -75,13 +75,10 @@ EmulatedNetworkNode* NetworkEmulationManagerImpl::CreateEmulatedNode(
|
||||
auto node = absl::make_unique<EmulatedNetworkNode>(
|
||||
clock_, &task_queue_, std::move(network_behavior));
|
||||
EmulatedNetworkNode* out = node.get();
|
||||
|
||||
struct Closure {
|
||||
void operator()() { manager->network_nodes_.push_back(std::move(node)); }
|
||||
NetworkEmulationManagerImpl* manager;
|
||||
std::unique_ptr<EmulatedNetworkNode> node;
|
||||
};
|
||||
task_queue_.PostTask(Closure{this, std::move(node)});
|
||||
task_queue_.PostTask(CreateResourceOwningTask(
|
||||
std::move(node), [this](std::unique_ptr<EmulatedNetworkNode> node) {
|
||||
network_nodes_.push_back(std::move(node));
|
||||
}));
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
@ -66,8 +66,6 @@ class NetworkEmulationManagerImpl : public NetworkEmulationManager {
|
||||
const std::vector<EmulatedEndpoint*>& endpoints) override;
|
||||
|
||||
private:
|
||||
FakeNetworkSocketServer* CreateSocketServer(
|
||||
const std::vector<EmulatedEndpoint*>& endpoints);
|
||||
absl::optional<rtc::IPAddress> GetNextIPv4Address();
|
||||
Timestamp Now() const;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user