Index: webrtc/api/rtcstatscollector.h |
diff --git a/webrtc/api/rtcstatscollector.h b/webrtc/api/rtcstatscollector.h |
index c32d65f2460a83447946b70430b5bf1bc05b5074..6823385a9b9249a0aff4ba932c2dab269274694a 100644 |
--- a/webrtc/api/rtcstatscollector.h |
+++ b/webrtc/api/rtcstatscollector.h |
@@ -70,8 +70,13 @@ 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); |
+ ~RTCStatsCollector(); |
// Stats gathering on a particular thread. Calls |AddPartialResults| before |
// returning. Virtual for the sake of testing. |