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:
johan
2016-08-11 12:37:42 -07:00
committed by Commit bot
parent c8762a838f
commit fe1ffb141b
7 changed files with 5 additions and 15 deletions

View File

@ -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);

View File

@ -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();
}
}

View File

@ -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,

View File

@ -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,

View File

@ -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());

View File

@ -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_; }

View File

@ -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,