Use active ICE controller in P2PTransportChannel with an adapter (#6/n)

Controlled by a field trial, P2PTransportChannel can now use an active ICE controller instead of a legacy ICE controller.

P2PTransportChannel unit tests need non-trivial changes to exercise the refactored code path, so the testing changes are added in a follow-up CL.

Bug: webrtc:14367, webrtc:14131
Change-Id: I00d4930a5692c7d6d331ea9d6c2a2199304e363c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274701
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38114}
diff --git a/api/ice_transport_interface.h b/api/ice_transport_interface.h
index ca67771..cd6ada8 100644
--- a/api/ice_transport_interface.h
+++ b/api/ice_transport_interface.h
@@ -89,7 +89,18 @@
   // transport, in contrast with a legacy ICE controller that only picks the
   // best connection to use or ping, and lets the transport decide when and
   // whether to switch.
-  // TODO(bugs.webrtc.org/14367): currently unused, update doc when used.
+  //
+  // Which ICE controller is used is determined based on the field trial
+  // "WebRTC-UseActiveIceController" as follows:
+  //
+  //   1. If the field trial is not enabled
+  //      a. The legacy ICE controller factory is used if one is supplied.
+  //      b. If not, a default ICE controller (BasicIceController) is
+  //      constructed and used.
+  //
+  //   2. If the field trial is enabled
+  //      - then an active ICE controller factory must be supplied and is used.
+  //      - the legacy ICE controller factory is not used in this case.
   void set_active_ice_controller_factory(
       cricket::ActiveIceControllerFactoryInterface*
           active_ice_controller_factory) {