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

Unified Diff: webrtc/api/rtcstatscollector.cc

Issue 2597963002: RTCIceCandidateStats.transportId added and collected. (Closed)
Patch Set: Rebase with master Created 3 years, 12 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/api/rtcstats_integrationtest.cc ('k') | webrtc/api/rtcstatscollector_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/rtcstatscollector.cc
diff --git a/webrtc/api/rtcstatscollector.cc b/webrtc/api/rtcstatscollector.cc
index ff7b7516f6fa2e992e6473950e515af0c06bf7f3..3ab7ac94e1e12429a423d05d7180da4f84fdbef3 100644
--- a/webrtc/api/rtcstatscollector.cc
+++ b/webrtc/api/rtcstatscollector.cc
@@ -277,7 +277,7 @@ void ProduceCertificateStatsFromSSLCertificateStats(
const std::string& ProduceIceCandidateStats(
int64_t timestamp_us, const cricket::Candidate& candidate, bool is_local,
- RTCStatsReport* report) {
+ const std::string& transport_id, RTCStatsReport* report) {
const std::string& id = "RTCIceCandidate_" + candidate.id();
const RTCStats* stats = report->Get(id);
if (!stats) {
@@ -286,6 +286,7 @@ const std::string& ProduceIceCandidateStats(
candidate_stats.reset(new RTCLocalIceCandidateStats(id, timestamp_us));
else
candidate_stats.reset(new RTCRemoteIceCandidateStats(id, timestamp_us));
+ candidate_stats->transport_id = transport_id;
candidate_stats->ip = candidate.address().ipaddr().ToString();
candidate_stats->port = static_cast<int32_t>(candidate.address().port());
candidate_stats->protocol = candidate.protocol();
@@ -664,9 +665,9 @@ void RTCStatsCollector::ProduceIceCandidateAndPairStats_n(
// Port objects, and prflx candidates (both local and remote) are only
// stored in candidate pairs. crbug.com/632723
candidate_pair_stats->local_candidate_id = ProduceIceCandidateStats(
- timestamp_us, info.local_candidate, true, report);
+ timestamp_us, info.local_candidate, true, transport_id, report);
candidate_pair_stats->remote_candidate_id = ProduceIceCandidateStats(
- timestamp_us, info.remote_candidate, false, report);
+ timestamp_us, info.remote_candidate, false, transport_id, report);
candidate_pair_stats->state =
IceCandidatePairStateToRTCStatsIceCandidatePairState(info.state);
candidate_pair_stats->priority = info.priority;
« no previous file with comments | « webrtc/api/rtcstats_integrationtest.cc ('k') | webrtc/api/rtcstatscollector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698