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

Unified Diff: webrtc/api/peerconnection.cc

Issue 2335553006: Moving webrtc/stats/ into webrtc/api/ to resolve a circular dependency (Closed)
Patch Set: Created 4 years, 3 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/api/peerconnection.cc
diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc
index bdd33d7d371003d15197f10579413fb253421263..ab5cde35aeb8ca4de4729eebeed282c97d79e62d 100644
--- a/webrtc/api/peerconnection.cc
+++ b/webrtc/api/peerconnection.cc
@@ -632,6 +632,7 @@ bool PeerConnection::Initialize(
configuration.redetermine_role_on_ice_restart))));
stats_.reset(new StatsCollector(this));
+ stats_collector_ = RTCStatsCollector::Create(this);
enable_ice_renomination_ = configuration.enable_ice_renomination;
@@ -888,6 +889,12 @@ bool PeerConnection::GetStats(StatsObserver* observer,
return true;
}
+void PeerConnection::GetRTCStats(
+ const rtc::scoped_refptr<RTCStatsCollectorCallback>& callback) {
+ RTC_DCHECK(stats_collector_);
nisse-webrtc 2016/09/13 08:16:40 Does stats_collector_ have to be a member, created
hbos 2016/09/13 08:50:37 You could create it temporary for just a call and
+ stats_collector_->GetStatsReport(callback);
+}
+
PeerConnectionInterface::SignalingState PeerConnection::signaling_state() {
return signaling_state_;
}

Powered by Google App Engine
This is Rietveld 408576698