Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1075)

Unified Diff: webrtc/p2p/base/p2ptransportchannel.cc

Issue 2176743003: Merge SignalPortPruned with SignalPortsRemoved in PortAllocatorSession (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/p2p/base/p2ptransportchannel.cc
diff --git a/webrtc/p2p/base/p2ptransportchannel.cc b/webrtc/p2p/base/p2ptransportchannel.cc
index 5238da83ca9302954e00b4a5204fc5121eda6851..4648d2a88423243c7138f02ba307ac3509be8bcb 100644
--- a/webrtc/p2p/base/p2ptransportchannel.cc
+++ b/webrtc/p2p/base/p2ptransportchannel.cc
@@ -138,7 +138,6 @@ void P2PTransportChannel::AddAllocatorSession(
session->SignalPortReady.connect(this, &P2PTransportChannel::OnPortReady);
session->SignalPortsRemoved.connect(this,
&P2PTransportChannel::OnPortsRemoved);
- session->SignalPortPruned.connect(this, &P2PTransportChannel::OnPortPruned);
session->SignalCandidatesReady.connect(
this, &P2PTransportChannel::OnCandidatesReady);
session->SignalCandidatesRemoved.connect(
@@ -1689,7 +1688,6 @@ void P2PTransportChannel::OnPortsRemoved(
PortAllocatorSession* session,
const std::vector<PortInterface*>& ports) {
ASSERT(worker_thread_ == rtc::Thread::Current());
- LOG(LS_INFO) << "Remove " << ports.size() << " ports";
for (PortInterface* port : ports) {
if (RemovePort(port)) {
LOG(INFO) << "Removed port: " << port->ToString() << " " << ports_.size()
@@ -1730,14 +1728,6 @@ void P2PTransportChannel::OnRegatherOnFailedNetworks() {
MSG_REGATHER_ON_FAILED_NETWORKS);
}
-void P2PTransportChannel::OnPortPruned(PortAllocatorSession* session,
- PortInterface* port) {
- if (RemovePort(port)) {
- LOG(INFO) << "Removed port because it is pruned: " << port->ToString()
- << " " << ports_.size() << " remaining";
- }
-}
-
bool P2PTransportChannel::RemovePort(PortInterface* port) {
pthatcher1 2016/07/27 18:38:11 This should probably be called OnPortPruned
honghaiz3 2016/07/27 21:31:26 Done.
auto it = std::find(ports_.begin(), ports_.end(), port);
// Don't need to do anything if the port has been deleted from the port list.

Powered by Google App Engine
This is Rietveld 408576698