Skip to content

Commit

Permalink
Revert "Add an active ICE controller that wraps a legacy controller (#7
Browse files Browse the repository at this point in the history
…/n)"

This reverts commit 6326c9c.

Reason for revert: breaks upstream project

Original change's description:
> Add an active ICE controller that wraps a legacy controller (#7/n)
>
> The wrapping ICE controller will allow existing ICE controller implementations to migrate to the active interface, and eventually deprecate the legacy interface.
>
> Follow-up CL has unit tests for P2PTransportChannel using the new wrapping controller.
>
> Bug: webrtc:14367, webrtc:14131
> Change-Id: I6c517449ff1e503e8268a7ef91afda793723fdeb
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275302
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> Commit-Queue: Sameer Vijaykar <samvi@google.com>
> Cr-Commit-Position: refs/heads/main@{#38130}

Bug: webrtc:14367, webrtc:14131
Change-Id: I61dd98de62657852068c7566b55f19f662df9ff4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276043
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Auto-Submit: Sameer Vijaykar <samvi@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#38131}
  • Loading branch information
sam-vi authored and WebRTC LUCI CQ committed Sep 20, 2022
1 parent 6326c9c commit 50a2a73
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 729 deletions.
6 changes: 2 additions & 4 deletions api/ice_transport_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,8 @@ struct IceTransportInit final {
// constructed and used.
//
// 2. If the field trial is enabled
// a. If an active ICE controller factory is supplied, it is used and
// the legacy ICE controller factory is not used.
// b. If not, a default active ICE controller is used, wrapping over the
// supplied or the default legacy ICE controller.
// - 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) {
Expand Down
4 changes: 0 additions & 4 deletions p2p/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ rtc_library("rtc_p2p") {
"base/turn_port.cc",
"base/turn_port.h",
"base/udp_port.h",
"base/wrapping_active_ice_controller.cc",
"base/wrapping_active_ice_controller.h",
"client/basic_port_allocator.cc",
"client/basic_port_allocator.h",
"client/relay_port_factory_interface.h",
Expand Down Expand Up @@ -203,7 +201,6 @@ if (rtc_include_tests) {
"base/fake_packet_transport.h",
"base/mock_active_ice_controller.h",
"base/mock_async_resolver.h",
"base/mock_ice_agent.h",
"base/mock_ice_controller.h",
"base/mock_ice_transport.h",
"base/test_stun_server.cc",
Expand Down Expand Up @@ -263,7 +260,6 @@ if (rtc_include_tests) {
"base/transport_description_unittest.cc",
"base/turn_port_unittest.cc",
"base/turn_server_unittest.cc",
"base/wrapping_active_ice_controller_unittest.cc",
"client/basic_port_allocator_unittest.cc",
]
deps = [
Expand Down
50 changes: 0 additions & 50 deletions p2p/base/mock_ice_agent.h

This file was deleted.

14 changes: 4 additions & 10 deletions p2p/base/p2p_transport_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include "p2p/base/connection.h"
#include "p2p/base/connection_info.h"
#include "p2p/base/port.h"
#include "p2p/base/wrapping_active_ice_controller.h"
#include "rtc_base/checks.h"
#include "rtc_base/crc32.h"
#include "rtc_base/experiments/struct_parameters_parser.h"
Expand Down Expand Up @@ -2473,15 +2472,10 @@ P2PTransportChannel::IceControllerAdapter::IceControllerAdapter(
P2PTransportChannel* transport)
: transport_(transport) {
if (UseActiveIceControllerFieldTrialEnabled(field_trials)) {
if (active_ice_controller_factory) {
ActiveIceControllerFactoryArgs active_args{args,
/* ice_agent= */ transport};
active_ice_controller_ =
active_ice_controller_factory->Create(active_args);
} else {
active_ice_controller_ = std::make_unique<WrappingActiveIceController>(
/* ice_agent= */ transport, ice_controller_factory, args);
}
RTC_DCHECK(active_ice_controller_factory);
ActiveIceControllerFactoryArgs active_args{args,
/* ice_agent= */ transport};
active_ice_controller_ = active_ice_controller_factory->Create(active_args);
} else {
if (ice_controller_factory != nullptr) {
legacy_ice_controller_ = ice_controller_factory->Create(args);
Expand Down
253 changes: 0 additions & 253 deletions p2p/base/wrapping_active_ice_controller.cc

This file was deleted.

Loading

0 comments on commit 50a2a73

Please sign in to comment.