Index: webrtc/api/rtcstatscollector.h |
diff --git a/webrtc/api/rtcstatscollector.h b/webrtc/api/rtcstatscollector.h |
index ae04e61e56cd7256411f00230fd624941a7e63de..de374fc9a3096da53df2f1f1427f34361364148f 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> |
@@ -20,6 +21,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 { |
@@ -76,15 +78,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, |
+ int64_t timestamp_us, |
+ const std::map<std::string, CertificateStatsPair>& transport_cert_stats, |
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 |RTCDataChannelStats|. |
void ProduceDataChannelStats_s( |
@@ -99,6 +107,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>& transport_cert_stats, |
+ RTCStatsReport* report) const; |
+ |
+ // Helper function to stats-producing functions. |
+ std::map<std::string, CertificateStatsPair> |
+ PrepareTransportCertificateStats_s(const SessionStats& session_stats) const; |
PeerConnection* const pc_; |
rtc::Thread* const signaling_thread_; |