Remove deprecated ProxyConnection ctor and make NewWeakPtr protected.

Bug: webrtc:13892
Change-Id: Icad20a0f6d304c23106dd880f3bfd2c7142929c9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258601
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36583}
This commit is contained in:
Tommi
2022-04-10 14:02:23 +02:00
committed by WebRTC LUCI CQ
parent af0a6b34e3
commit 6b1d626b04
3 changed files with 2 additions and 11 deletions

View File

@ -1624,11 +1624,6 @@ ProxyConnection::ProxyConnection(rtc::WeakPtr<Port> port,
const Candidate& remote_candidate)
: Connection(std::move(port), index, remote_candidate) {}
ProxyConnection::ProxyConnection(Port* port,
size_t index,
const Candidate& remote_candidate)
: ProxyConnection(port->NewWeakPtr(), index, remote_candidate) {}
int ProxyConnection::Send(const void* data,
size_t size,
const rtc::PacketOptions& options) {

View File

@ -472,9 +472,6 @@ class ProxyConnection : public Connection {
size_t index,
const Candidate& remote_candidate);
// TODO(tommi): Remove this ctor once it's no longer needed.
ProxyConnection(Port* port, size_t index, const Candidate& remote_candidate);
int Send(const void* data,
size_t size,
const rtc::PacketOptions& options) override;

View File

@ -381,9 +381,6 @@ class Port : public PortInterface,
const std::string& relay_protocol,
const rtc::SocketAddress& base_address);
// TODO(tommi): Make protected after updating ProxyConnection.
rtc::WeakPtr<Port> NewWeakPtr() { return weak_factory_.GetWeakPtr(); }
protected:
enum { MSG_DESTROY_IF_DEAD = 0, MSG_FIRST_AVAILABLE };
@ -391,6 +388,8 @@ class Port : public PortInterface,
void set_type(const std::string& type) { type_ = type; }
rtc::WeakPtr<Port> NewWeakPtr() { return weak_factory_.GetWeakPtr(); }
void AddAddress(const rtc::SocketAddress& address,
const rtc::SocketAddress& base_address,
const rtc::SocketAddress& related_address,