Change PeerConnection creation to use a static "Create" method
This allows making more members (including IsUnifiedPlan) const in a future CL.
Also revises the test for ReportUsageHistogram to use a configuration member
variable rather than a hook function in PeerConnectionFactory.
Bug: webrtc:12079
Change-Id: I6f1af7d6164c8a0d8466f76378a925d72d57d685
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190280
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32485}
diff --git a/api/peer_connection_interface.h b/api/peer_connection_interface.h
index 6cf6dbb..0e6cd5c 100644
--- a/api/peer_connection_interface.h
+++ b/api/peer_connection_interface.h
@@ -640,6 +640,9 @@
// Whether network condition based codec switching is allowed.
absl::optional<bool> allow_codec_switching;
+ // The delay before doing a usage histogram report for long-lived
+ // PeerConnections. Used for testing only.
+ absl::optional<int> report_usage_pattern_delay_ms;
//
// Don't forget to update operator== if adding something.
//