Remove unused SessionId from TransportChannel and PortAllocatorSession.
BUG= Review-Url: https://codereview.webrtc.org/2237853002 Cr-Commit-Position: refs/heads/master@{#13731}
This commit is contained in:
@ -118,7 +118,6 @@ class DtlsTransportChannelWrapper : public TransportChannelImpl {
|
||||
bool GetStats(ConnectionInfos* infos) override {
|
||||
return channel_->GetStats(infos);
|
||||
}
|
||||
const std::string SessionId() const override { return channel_->SessionId(); }
|
||||
|
||||
virtual bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version);
|
||||
|
||||
|
||||
@ -447,7 +447,7 @@ void P2PTransportChannel::MaybeStartGathering() {
|
||||
}
|
||||
} else {
|
||||
AddAllocatorSession(allocator_->CreateSession(
|
||||
SessionId(), transport_name(), component(), ice_ufrag_, ice_pwd_));
|
||||
transport_name(), component(), ice_ufrag_, ice_pwd_));
|
||||
allocator_sessions_.back()->StartGettingPorts();
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,7 +68,6 @@ void PortAllocator::SetConfiguration(
|
||||
}
|
||||
|
||||
std::unique_ptr<PortAllocatorSession> PortAllocator::CreateSession(
|
||||
const std::string& sid,
|
||||
const std::string& content_name,
|
||||
int component,
|
||||
const std::string& ice_ufrag,
|
||||
|
||||
@ -301,7 +301,6 @@ class PortAllocator : public sigslot::has_slots<> {
|
||||
virtual void SetNetworkIgnoreMask(int network_ignore_mask) = 0;
|
||||
|
||||
std::unique_ptr<PortAllocatorSession> CreateSession(
|
||||
const std::string& sid,
|
||||
const std::string& content_name,
|
||||
int component,
|
||||
const std::string& ice_ufrag,
|
||||
|
||||
@ -15,7 +15,6 @@
|
||||
#include "webrtc/p2p/base/fakeportallocator.h"
|
||||
#include "webrtc/p2p/base/portallocator.h"
|
||||
|
||||
static const char kSessionId[] = "session id";
|
||||
static const char kContentName[] = "test content";
|
||||
// Based on ICE_UFRAG_LENGTH
|
||||
static const char kIceUfrag[] = "UF00";
|
||||
@ -39,7 +38,6 @@ class PortAllocatorTest : public testing::Test, public sigslot::has_slots<> {
|
||||
}
|
||||
|
||||
std::unique_ptr<cricket::FakePortAllocatorSession> CreateSession(
|
||||
const std::string& sid,
|
||||
const std::string& content_name,
|
||||
int component,
|
||||
const std::string& ice_ufrag,
|
||||
@ -47,8 +45,7 @@ class PortAllocatorTest : public testing::Test, public sigslot::has_slots<> {
|
||||
return std::unique_ptr<cricket::FakePortAllocatorSession>(
|
||||
static_cast<cricket::FakePortAllocatorSession*>(
|
||||
allocator_
|
||||
->CreateSession(sid, content_name, component, ice_ufrag,
|
||||
ice_pwd)
|
||||
->CreateSession(content_name, component, ice_ufrag, ice_pwd)
|
||||
.release()));
|
||||
}
|
||||
|
||||
@ -95,7 +92,7 @@ TEST_F(PortAllocatorTest, TestDefaults) {
|
||||
// candidate filter are applied as expected.
|
||||
TEST_F(PortAllocatorTest, CreateSession) {
|
||||
allocator_->set_candidate_filter(cricket::CF_RELAY);
|
||||
auto session = CreateSession(kSessionId, kContentName, 1, kIceUfrag, kIcePwd);
|
||||
auto session = CreateSession(kContentName, 1, kIceUfrag, kIcePwd);
|
||||
ASSERT_NE(nullptr, session);
|
||||
EXPECT_EQ(cricket::CF_RELAY, session->candidate_filter());
|
||||
EXPECT_EQ(kContentName, session->content_name());
|
||||
|
||||
@ -66,10 +66,6 @@ class TransportChannel : public sigslot::has_slots<> {
|
||||
return TransportChannelState::STATE_CONNECTING;
|
||||
}
|
||||
|
||||
// TODO(mallinath) - Remove this API, as it's no longer useful.
|
||||
// Returns the session id of this channel.
|
||||
virtual const std::string SessionId() const { return std::string(); }
|
||||
|
||||
const std::string& transport_name() const { return transport_name_; }
|
||||
int component() const { return component_; }
|
||||
|
||||
|
||||
@ -235,8 +235,8 @@ class BasicPortAllocatorTest : public testing::Test,
|
||||
int component,
|
||||
const std::string& ice_ufrag,
|
||||
const std::string& ice_pwd) {
|
||||
std::unique_ptr<PortAllocatorSession> session = allocator_->CreateSession(
|
||||
sid, content_name, component, ice_ufrag, ice_pwd);
|
||||
std::unique_ptr<PortAllocatorSession> session =
|
||||
allocator_->CreateSession(content_name, component, ice_ufrag, ice_pwd);
|
||||
session->SignalPortReady.connect(this,
|
||||
&BasicPortAllocatorTest::OnPortReady);
|
||||
session->SignalPortsPruned.connect(this,
|
||||
|
||||
Reference in New Issue
Block a user