Index: webrtc/api/rtcstatscollector.h |
diff --git a/webrtc/api/rtcstatscollector.h b/webrtc/api/rtcstatscollector.h |
index c32d65f2460a83447946b70430b5bf1bc05b5074..3cf2b85311399992d3f5ad6b21cc16e735a3eb1e 100644 |
--- a/webrtc/api/rtcstatscollector.h |
+++ b/webrtc/api/rtcstatscollector.h |
@@ -70,6 +70,10 @@ class RTCStatsCollector : public virtual rtc::RefCountInterface, |
// calling |GetStatsReport| guarantees fresh stats. |
void ClearCachedStatsReport(); |
+ // If there is a |GetStatsReport| requests in-flight, waits until it has been |
+ // completed. Must be called on the signaling thread. |
+ void WaitForPendingRequest(); |
+ |
protected: |
RTCStatsCollector(PeerConnection* pc, int64_t cache_lifetime_us); |