Delete one of BasicPortAllocator constructors as unused
Bug: webrtc:42232556 Change-Id: Ia0a461d646fa1773099e11cbb03851381642bec0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/376560 Auto-Submit: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Reviewed-by: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43859}
This commit is contained in:
parent
df532ba1db
commit
7a0b955223
@ -188,23 +188,6 @@ BasicPortAllocator::BasicPortAllocator(
|
|||||||
webrtc::NO_PRUNE, customizer);
|
webrtc::NO_PRUNE, customizer);
|
||||||
}
|
}
|
||||||
|
|
||||||
BasicPortAllocator::BasicPortAllocator(
|
|
||||||
rtc::NetworkManager* network_manager,
|
|
||||||
rtc::PacketSocketFactory* socket_factory,
|
|
||||||
const ServerAddresses& stun_servers,
|
|
||||||
const webrtc::FieldTrialsView* field_trials)
|
|
||||||
: field_trials_(field_trials),
|
|
||||||
network_manager_(network_manager),
|
|
||||||
socket_factory_(socket_factory),
|
|
||||||
default_relay_port_factory_(new TurnPortFactory()),
|
|
||||||
relay_port_factory_(default_relay_port_factory_.get()) {
|
|
||||||
RTC_CHECK(socket_factory_);
|
|
||||||
RTC_DCHECK(relay_port_factory_);
|
|
||||||
RTC_DCHECK(network_manager_);
|
|
||||||
SetConfiguration(stun_servers, std::vector<RelayServerConfig>(), 0,
|
|
||||||
webrtc::NO_PRUNE, nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
BasicPortAllocator::~BasicPortAllocator() {
|
BasicPortAllocator::~BasicPortAllocator() {
|
||||||
CheckRunOnValidThreadIfInitialized();
|
CheckRunOnValidThreadIfInitialized();
|
||||||
// Our created port allocator sessions depend on us, so destroy our remaining
|
// Our created port allocator sessions depend on us, so destroy our remaining
|
||||||
|
|||||||
@ -42,10 +42,10 @@ class RTC_EXPORT BasicPortAllocator : public PortAllocator {
|
|||||||
webrtc::TurnCustomizer* customizer = nullptr,
|
webrtc::TurnCustomizer* customizer = nullptr,
|
||||||
RelayPortFactoryInterface* relay_port_factory = nullptr,
|
RelayPortFactoryInterface* relay_port_factory = nullptr,
|
||||||
const webrtc::FieldTrialsView* field_trials = nullptr);
|
const webrtc::FieldTrialsView* field_trials = nullptr);
|
||||||
BasicPortAllocator(rtc::NetworkManager* network_manager,
|
|
||||||
rtc::PacketSocketFactory* socket_factory,
|
BasicPortAllocator(const BasicPortAllocator&) = delete;
|
||||||
const ServerAddresses& stun_servers,
|
BasicPortAllocator& operator=(const BasicPortAllocator&) = delete;
|
||||||
const webrtc::FieldTrialsView* field_trials = nullptr);
|
|
||||||
~BasicPortAllocator() override;
|
~BasicPortAllocator() override;
|
||||||
|
|
||||||
// Set to kDefaultNetworkIgnoreMask by default.
|
// Set to kDefaultNetworkIgnoreMask by default.
|
||||||
|
|||||||
@ -165,11 +165,11 @@ class BasicPortAllocatorTestBase : public ::testing::Test,
|
|||||||
kTurnUdpIntAddr,
|
kTurnUdpIntAddr,
|
||||||
kTurnUdpExtAddr),
|
kTurnUdpExtAddr),
|
||||||
candidate_allocation_done_(false) {
|
candidate_allocation_done_(false) {
|
||||||
ServerAddresses stun_servers;
|
|
||||||
stun_servers.insert(kStunAddr);
|
|
||||||
|
|
||||||
allocator_ = std::make_unique<BasicPortAllocator>(
|
allocator_ = std::make_unique<BasicPortAllocator>(
|
||||||
&network_manager_, &socket_factory_, stun_servers, &field_trials_);
|
&network_manager_, &socket_factory_, /*customizer=*/nullptr,
|
||||||
|
/*relay_port_factory=*/nullptr, &field_trials_);
|
||||||
|
allocator_->SetConfiguration({kStunAddr}, {}, 0, webrtc::NO_PRUNE, nullptr);
|
||||||
|
|
||||||
allocator_->Initialize();
|
allocator_->Initialize();
|
||||||
allocator_->set_step_delay(kMinimumStepDelay);
|
allocator_->set_step_delay(kMinimumStepDelay);
|
||||||
webrtc::metrics::Reset();
|
webrtc::metrics::Reset();
|
||||||
@ -489,9 +489,13 @@ class BasicPortAllocatorTestBase : public ::testing::Test,
|
|||||||
if (!stun_server.IsNil()) {
|
if (!stun_server.IsNil()) {
|
||||||
stun_servers.insert(stun_server);
|
stun_servers.insert(stun_server);
|
||||||
}
|
}
|
||||||
allocator_.reset(new BasicPortAllocator(&network_manager_,
|
allocator_ = std::make_unique<BasicPortAllocator>(
|
||||||
nat_socket_factory_.get(),
|
&network_manager_, nat_socket_factory_.get(),
|
||||||
stun_servers, &field_trials_));
|
/*customizer=*/nullptr,
|
||||||
|
/*relay_port_factory=*/nullptr, &field_trials_);
|
||||||
|
allocator_->SetConfiguration(stun_servers, {}, 0, webrtc::NO_PRUNE,
|
||||||
|
nullptr);
|
||||||
|
|
||||||
allocator_->Initialize();
|
allocator_->Initialize();
|
||||||
allocator_->set_step_delay(kMinimumStepDelay);
|
allocator_->set_step_delay(kMinimumStepDelay);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user