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

Unified Diff: webrtc/api/peerconnection.cc

Issue 2472113002: Correct stats for RTCPeerConnectionStats.dataChannels[Opened/Closed]. (Closed)
Patch Set: Created 4 years, 1 month 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/api/peerconnection.cc
diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc
index 830c301a6d9cf0090870e3a06bca4ce23835ec0c..f865cbe79df6e34d061fb8906822e4b00f728930 100644
--- a/webrtc/api/peerconnection.cc
+++ b/webrtc/api/peerconnection.cc
@@ -2079,6 +2079,10 @@ rtc::scoped_refptr<DataChannel> PeerConnection::InternalCreateDataChannel(
sid_allocator_.ReleaseSid(new_config.id);
return nullptr;
}
+ channel->SignalOpened.connect(stats_collector_.get(),
+ &RTCStatsCollector::OnDataChannelOpened);
+ channel->SignalOpened.connect(stats_collector_.get(),
+ &RTCStatsCollector::OnDataChannelClosed);
if (channel->data_channel_type() == cricket::DCT_RTP) {
if (rtp_data_channels_.find(channel->label()) != rtp_data_channels_.end()) {

Powered by Google App Engine
This is Rietveld 408576698