Measure RTCPMuxPolicy at time of connect

to see if we can finally deprecate it.
Chromium metrics CL:
  https://chromium-review.googlesource.com/c/chromium/src/+/4193156

BUG=chromium:713445

Change-Id: I4847620a50f8ece6a2c9aeb5b754b46455e732ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291332
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39203}
diff --git a/api/uma_metrics.h b/api/uma_metrics.h
index 9eb3bf7..a63159e 100644
--- a/api/uma_metrics.h
+++ b/api/uma_metrics.h
@@ -175,6 +175,16 @@
   kProvisionalAnswerMax
 };
 
+// Metrics for RTCRtpMuxPolicy. The only defined value is
+// https://w3c.github.io/webrtc-pc/#rtcrtcpmuxpolicy-enum
+// "require" but there is a legacy option "negotiate" which
+// was removed from the spec.
+enum RtcpMuxPolicyUsage {
+  kRtcpMuxPolicyUsageRequire = 0,
+  kRtcpMuxPolicyUsageNegotiate = 1,
+  kRtcpMuxPolicyUsageMax
+};
+
 // When adding new metrics please consider using the style described in
 // https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md#usage
 // instead of the legacy enums used above.
diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc
index 2e74340..f318acf 100644
--- a/pc/peer_connection.cc
+++ b/pc/peer_connection.cc
@@ -2028,6 +2028,19 @@
         "WebRTC.PeerConnection.ValidIceChars",
         !(isUsingInvalidIceCharInUfrag || isUsingInvalidIceCharInPwd));
   }
+
+  // Record RtcpMuxPolicy setting.
+  RtcpMuxPolicyUsage rtcp_mux_policy = kRtcpMuxPolicyUsageMax;
+  switch (configuration_.rtcp_mux_policy) {
+    case kRtcpMuxPolicyNegotiate:
+      rtcp_mux_policy = kRtcpMuxPolicyUsageNegotiate;
+      break;
+    case kRtcpMuxPolicyRequire:
+      rtcp_mux_policy = kRtcpMuxPolicyUsageRequire;
+      break;
+  }
+  RTC_HISTOGRAM_ENUMERATION("WebRTC.PeerConnection.RtcpMuxPolicy",
+                            rtcp_mux_policy, kRtcpMuxPolicyUsageMax);
 }
 
 void PeerConnection::OnIceGatheringChange(