Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1122)

Unified Diff: webrtc/stats/rtcstats_objects.cc

Issue 2373503002: rtc_stats: Update code to remove chromium style warnings suppression. (Closed)
Patch Set: Addressed comments and rebase with master Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/stats/BUILD.gn ('k') | webrtc/stats/rtcstats_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/stats/rtcstats_objects.cc
diff --git a/webrtc/stats/rtcstats_objects.cc b/webrtc/stats/rtcstats_objects.cc
index fbd16ed39daddfc4a7e0c190f01bd6549091f9c8..b90941a5c00b48e79148fd50dc208e2755d9f711 100644
--- a/webrtc/stats/rtcstats_objects.cc
+++ b/webrtc/stats/rtcstats_objects.cc
@@ -12,7 +12,11 @@
namespace webrtc {
-const char RTCCertificateStats::kType[] = "certificate";
+WEBRTC_RTCSTATS_IMPL(RTCCertificateStats, RTCStats, "certificate",
+ &fingerprint,
+ &fingerprint_algorithm,
+ &base64_certificate,
+ &issuer_certificate_id);
RTCCertificateStats::RTCCertificateStats(
const std::string& id, int64_t timestamp_us)
@@ -28,7 +32,21 @@ RTCCertificateStats::RTCCertificateStats(
issuer_certificate_id("issuerCertificateId") {
}
-const char RTCPeerConnectionStats::kType[] = "peer-connection";
+RTCCertificateStats::RTCCertificateStats(
+ const RTCCertificateStats& other)
+ : RTCStats(other.id(), other.timestamp_us()),
+ fingerprint(other.fingerprint),
+ fingerprint_algorithm(other.fingerprint_algorithm),
+ base64_certificate(other.base64_certificate),
+ issuer_certificate_id(other.issuer_certificate_id) {
+}
+
+RTCCertificateStats::~RTCCertificateStats() {
+}
+
+WEBRTC_RTCSTATS_IMPL(RTCPeerConnectionStats, RTCStats, "peer-connection",
+ &data_channels_opened,
+ &data_channels_closed);
RTCPeerConnectionStats::RTCPeerConnectionStats(
const std::string& id, int64_t timestamp_us)
@@ -42,4 +60,14 @@ RTCPeerConnectionStats::RTCPeerConnectionStats(
data_channels_closed("dataChannelsClosed") {
}
+RTCPeerConnectionStats::RTCPeerConnectionStats(
+ const RTCPeerConnectionStats& other)
+ : RTCStats(other.id(), other.timestamp_us()),
+ data_channels_opened(other.data_channels_opened),
+ data_channels_closed(other.data_channels_closed) {
+}
+
+RTCPeerConnectionStats::~RTCPeerConnectionStats() {
+}
+
} // namespace webrtc
« no previous file with comments | « webrtc/stats/BUILD.gn ('k') | webrtc/stats/rtcstats_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698