Index: webrtc/api/rtcstatscollector.h |
diff --git a/webrtc/api/rtcstatscollector.h b/webrtc/api/rtcstatscollector.h |
index 712f9e29494a8e813242580b769de974f1b41cef..6e6405fdc1aaefdb0614e12ebdf1d81afb753f4f 100644 |
--- a/webrtc/api/rtcstatscollector.h |
+++ b/webrtc/api/rtcstatscollector.h |
@@ -11,6 +11,7 @@ |
#ifndef WEBRTC_API_RTCSTATSCOLLECTOR_H_ |
#define WEBRTC_API_RTCSTATSCOLLECTOR_H_ |
+#include <map> |
#include <memory> |
#include <vector> |
@@ -19,6 +20,7 @@ |
#include "webrtc/base/asyncinvoker.h" |
#include "webrtc/base/refcount.h" |
#include "webrtc/base/scoped_ref_ptr.h" |
+#include "webrtc/base/sslidentity.h" |
#include "webrtc/base/timeutils.h" |
namespace cricket { |
@@ -75,15 +77,21 @@ class RTCStatsCollector : public virtual rtc::RefCountInterface { |
const rtc::scoped_refptr<RTCStatsReport>& partial_report); |
private: |
+ struct CertificateStatsPair { |
+ std::unique_ptr<rtc::SSLCertificateStats> local; |
+ std::unique_ptr<rtc::SSLCertificateStats> remote; |
+ }; |
+ |
void AddPartialResults_s(rtc::scoped_refptr<RTCStatsReport> partial_report); |
void DeliverCachedReport(); |
// Produces |RTCCertificateStats|. |
void ProduceCertificateStats_s( |
int64_t timestamp_us, const SessionStats& session_stats, |
+ const std::map<std::string, CertificateStatsPair>& certificate_stats_map, |
RTCStatsReport* report) const; |
- void ProduceCertificateStatsFromSSLCertificateAndChain_s( |
- int64_t timestamp_us, const rtc::SSLCertificate& certificate, |
+ void ProduceCertificateStatsFromSSLCertificateStats_s( |
+ int64_t timestamp_us, const rtc::SSLCertificateStats& certificate_stats, |
RTCStatsReport* report) const; |
// Produces |RTCIceCandidatePairStats| and |RTCIceCandidateStats|. |
void ProduceIceCandidateAndPairStats_s( |
@@ -95,6 +103,15 @@ class RTCStatsCollector : public virtual rtc::RefCountInterface { |
// Produces |RTCPeerConnectionStats|. |
void ProducePeerConnectionStats_s( |
int64_t timestamp_us, RTCStatsReport* report) const; |
+ // Produces |RTCTransportStats|. |
+ void ProduceTransportStats_s( |
+ int64_t timestamp_us, const SessionStats& session_stats, |
+ const std::map<std::string, CertificateStatsPair>& certificate_stats_map, |
+ RTCStatsReport* report) const; |
+ |
+ // Helper functions to stats producing functions. |
+ std::map<std::string, CertificateStatsPair> PrepareCertificateStatsMap_s( |
+ const SessionStats& session_stats) const; |
PeerConnection* const pc_; |
rtc::Thread* const signaling_thread_; |