aboutsummaryrefslogtreecommitdiff
path: root/p2p
diff options
context:
space:
mode:
authorTommi <tommi@webrtc.org>2022-04-10 14:02:23 +0200
committerWebRTC LUCI CQ <webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-04-20 10:14:17 +0000
commit6b1d626b043cea37d01b6a72ca1086fe4680a052 (patch)
tree4e4141732a7c9b4567b279b5c70f96de5ab9ecd5 /p2p
parentaf0a6b34e336ba7c0b0e0371875b2ba6db6ac9a8 (diff)
downloadwebrtc-6b1d626b043cea37d01b6a72ca1086fe4680a052.tar.gz
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}
Diffstat (limited to 'p2p')
-rw-r--r--p2p/base/connection.cc5
-rw-r--r--p2p/base/connection.h3
-rw-r--r--p2p/base/port.h5
3 files changed, 2 insertions, 11 deletions
diff --git a/p2p/base/connection.cc b/p2p/base/connection.cc
index 860b73cec7..25a4d012a9 100644
--- a/p2p/base/connection.cc
+++ b/p2p/base/connection.cc
@@ -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) {
diff --git a/p2p/base/connection.h b/p2p/base/connection.h
index eb3ab2664e..e0f8ed4874 100644
--- a/p2p/base/connection.h
+++ b/p2p/base/connection.h
@@ -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;
diff --git a/p2p/base/port.h b/p2p/base/port.h
index 33e9a53787..b1dab5e92b 100644
--- a/p2p/base/port.h
+++ b/p2p/base/port.h
@@ -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,