fix variable naming in ReportSdpFormatReceived
it no longer reports just offers.
BUG=chromium:857004
Change-Id: Idf35b6fa98f3ee6637aeef6b11553947fea3ee25
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202249
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#33024}
diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc
index eb68a5b..b5af735 100644
--- a/pc/peer_connection.cc
+++ b/pc/peer_connection.cc
@@ -2269,12 +2269,13 @@
}
void PeerConnection::ReportSdpFormatReceived(
- const SessionDescriptionInterface& remote_offer) {
+ const SessionDescriptionInterface& remote_description) {
int num_audio_mlines = 0;
int num_video_mlines = 0;
int num_audio_tracks = 0;
int num_video_tracks = 0;
- for (const ContentInfo& content : remote_offer.description()->contents()) {
+ for (const ContentInfo& content :
+ remote_description.description()->contents()) {
cricket::MediaType media_type = content.media_description()->type();
int num_tracks = std::max(
1, static_cast<int>(content.media_description()->streams().size()));
@@ -2294,7 +2295,7 @@
} else if (num_audio_tracks > 0 || num_video_tracks > 0) {
format = kSdpFormatReceivedSimple;
}
- switch (remote_offer.GetType()) {
+ switch (remote_description.GetType()) {
case SdpType::kOffer:
// Historically only offers were counted.
RTC_HISTOGRAM_ENUMERATION("WebRTC.PeerConnection.SdpFormatReceived",
@@ -2306,7 +2307,7 @@
break;
default:
RTC_LOG(LS_ERROR) << "Can not report SdpFormatReceived for "
- << SdpTypeToString(remote_offer.GetType());
+ << SdpTypeToString(remote_description.GetType());
break;
}
}
diff --git a/pc/peer_connection.h b/pc/peer_connection.h
index 8768ebb..65d893e 100644
--- a/pc/peer_connection.h
+++ b/pc/peer_connection.h
@@ -379,8 +379,9 @@
void SetIceConnectionState(IceConnectionState new_state);
void NoteUsageEvent(UsageEvent event);
- // Report the UMA metric SdpFormatReceived for the given remote offer.
- void ReportSdpFormatReceived(const SessionDescriptionInterface& remote_offer);
+ // Report the UMA metric SdpFormatReceived for the given remote description.
+ void ReportSdpFormatReceived(
+ const SessionDescriptionInterface& remote_description);
// Returns true if the PeerConnection is configured to use Unified Plan
// semantics for creating offers/answers and setting local/remote