Move RTCStatsCollector helper functions to anonymous namespace.

Simple refactoring.
Moved ProduceCertificateStatsFromSSLCertificateStats_s and
ProduceIceCandidateStats_s from member section of RTCStatsCollector
to the anonymous namespace of rtcstatscollector.cc.
The thread check is removed as a result, which makes sense because
the helper function does not know about which thread its input
parameter lives on, that is up to the calling place (which has a thread
check already).

This makes rtcstatscollector.h cleaner, and all ProduceBlahStats
functions are starting points of collecting various stats. (Call all
of them and you get a complete set of stats.)

(Not moving PrepareTransportCertificateStats_s because it is using a
private struct of RTCStatsCollector.)

BUG=627816

Review-Url: https://codereview.webrtc.org/2462573002
Cr-Commit-Position: refs/heads/master@{#14818}
This commit is contained in:
hbos
2016-10-28 05:14:53 -07:00
committed by Commit bot
parent f005a00094
commit 02ba211a9f
2 changed files with 53 additions and 61 deletions

View File

@ -91,9 +91,6 @@ class RTCStatsCollector : public virtual rtc::RefCountInterface {
int64_t timestamp_us,
const std::map<std::string, CertificateStatsPair>& transport_cert_stats,
RTCStatsReport* report) const;
void ProduceCertificateStatsFromSSLCertificateStats_s(
int64_t timestamp_us, const rtc::SSLCertificateStats& certificate_stats,
RTCStatsReport* report) const;
// Produces |RTCDataChannelStats|.
void ProduceDataChannelStats_s(
int64_t timestamp_us, RTCStatsReport* report) const;
@ -101,9 +98,6 @@ class RTCStatsCollector : public virtual rtc::RefCountInterface {
void ProduceIceCandidateAndPairStats_s(
int64_t timestamp_us, const SessionStats& session_stats,
RTCStatsReport* report) const;
const std::string& ProduceIceCandidateStats_s(
int64_t timestamp_us, const cricket::Candidate& candidate, bool is_local,
RTCStatsReport* report) const;
// Produces |RTCPeerConnectionStats|.
void ProducePeerConnectionStats_s(
int64_t timestamp_us, RTCStatsReport* report) const;