Remove deprecated ProxyInfo code

Bug: none
Change-Id: I82d3ee97927031d974e2ef657312101dd910eff4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347620
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42136}
diff --git a/api/BUILD.gn b/api/BUILD.gn
index 67d463d..2b484f8 100644
--- a/api/BUILD.gn
+++ b/api/BUILD.gn
@@ -429,7 +429,6 @@
   deps = [
     ":async_dns_resolver",
     "../rtc_base:async_packet_socket",
-    "../rtc_base:proxy_info",
     "../rtc_base:socket_address",
     "../rtc_base/system:rtc_export",
   ]
diff --git a/api/DEPS b/api/DEPS
index f9fdb72..0536d70 100644
--- a/api/DEPS
+++ b/api/DEPS
@@ -97,7 +97,6 @@
   ],
 
   "packet_socket_factory\.h": [
-    "+rtc_base/proxy_info.h",
     "+rtc_base/async_packet_socket.h",
   ],
 
diff --git a/api/packet_socket_factory.h b/api/packet_socket_factory.h
index 161c196..0785888 100644
--- a/api/packet_socket_factory.h
+++ b/api/packet_socket_factory.h
@@ -17,7 +17,6 @@
 
 #include "api/async_dns_resolver.h"
 #include "rtc_base/async_packet_socket.h"
-#include "rtc_base/proxy_info.h"
 #include "rtc_base/system/rtc_export.h"
 
 namespace rtc {
@@ -64,30 +63,10 @@
       uint16_t max_port,
       int opts) = 0;
 
-  // TODO(tommi): Remove once implementations outside of webrtc have been moved
-  // over to the `CreateClientTcpSocket` variant that does not use ProxyInfo.
-  [[deprecated]] virtual AsyncPacketSocket* CreateClientTcpSocket(
-      const SocketAddress& local_address,
-      const SocketAddress& remote_address,
-      const ProxyInfo& proxy_info,
-      const std::string& user_agent,
-      const PacketSocketTcpOptions& tcp_options) {
-    return CreateClientTcpSocket(local_address, remote_address, tcp_options);
-  }
-
-  // TODO(tommi): Make pure virtual. This temporary implementation is for
-  // derived classes outside of webrtc that don't override this function but
-  // override the deprecated version instead.
   virtual AsyncPacketSocket* CreateClientTcpSocket(
       const SocketAddress& local_address,
       const SocketAddress& remote_address,
-      const PacketSocketTcpOptions& tcp_options) {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-    return CreateClientTcpSocket(local_address, remote_address, ProxyInfo(),
-                                 std::string(), tcp_options);
-#pragma clang diagnostic pop
-  }
+      const PacketSocketTcpOptions& tcp_options) = 0;
 
   virtual std::unique_ptr<webrtc::AsyncDnsResolverInterface>
   CreateAsyncDnsResolver() = 0;
diff --git a/p2p/BUILD.gn b/p2p/BUILD.gn
index 8bb71ac..8a3c8eb 100644
--- a/p2p/BUILD.gn
+++ b/p2p/BUILD.gn
@@ -127,7 +127,6 @@
     "../rtc_base:network",
     "../rtc_base:network_constants",
     "../rtc_base:network_route",
-    "../rtc_base:proxy_info",
     "../rtc_base:rate_tracker",
     "../rtc_base:refcount",
     "../rtc_base:rtc_numerics",
@@ -246,7 +245,6 @@
     "../rtc_base:async_udp_socket",
     "../rtc_base:checks",
     "../rtc_base:logging",
-    "../rtc_base:proxy_info",
     "../rtc_base:socket",
     "../rtc_base:socket_adapters",
     "../rtc_base:socket_address",
@@ -345,7 +343,6 @@
     "../rtc_base:net_helper",
     "../rtc_base:network",
     "../rtc_base:network_constants",
-    "../rtc_base:proxy_info",
     "../rtc_base:rate_tracker",
     "../rtc_base:rtc_numerics",
     "../rtc_base:safe_minmax",
@@ -682,7 +679,6 @@
     "../rtc_base:mdns_responder_interface",
     "../rtc_base:net_helper",
     "../rtc_base:network",
-    "../rtc_base:proxy_info",
     "../rtc_base:rate_tracker",
     "../rtc_base:socket_address",
     "../rtc_base:ssl",
@@ -720,7 +716,6 @@
     "../api/transport:enums",
     "../rtc_base:checks",
     "../rtc_base:network",
-    "../rtc_base:proxy_info",
     "../rtc_base:socket_address",
     "../rtc_base:ssl",
     "../rtc_base:threading",
@@ -744,7 +739,6 @@
     "../api:packet_socket_factory",
     "../rtc_base:async_packet_socket",
     "../rtc_base:callback_list",
-    "../rtc_base:proxy_info",
     "../rtc_base:socket_address",
   ]
   absl_deps = [
@@ -1198,7 +1192,6 @@
       "../rtc_base:net_test_helpers",
       "../rtc_base:network",
       "../rtc_base:network_constants",
-      "../rtc_base:proxy_info",
       "../rtc_base:rtc_base_tests_utils",
       "../rtc_base:socket",
       "../rtc_base:socket_adapters",
diff --git a/p2p/base/basic_packet_socket_factory.h b/p2p/base/basic_packet_socket_factory.h
index a4f2b07..b172d34 100644
--- a/p2p/base/basic_packet_socket_factory.h
+++ b/p2p/base/basic_packet_socket_factory.h
@@ -19,7 +19,6 @@
 #include "api/async_dns_resolver.h"
 #include "api/packet_socket_factory.h"
 #include "rtc_base/async_packet_socket.h"
-#include "rtc_base/proxy_info.h"
 #include "rtc_base/socket.h"
 #include "rtc_base/socket_address.h"
 #include "rtc_base/socket_factory.h"
diff --git a/p2p/base/port.h b/p2p/base/port.h
index 24655aa..6cf71f4 100644
--- a/p2p/base/port.h
+++ b/p2p/base/port.h
@@ -322,21 +322,6 @@
       const rtc::SocketAddress& addr,
       const std::vector<uint16_t>& unknown_types);
 
-  [[deprecated]] void set_proxy(absl::string_view user_agent,
-                                const rtc::ProxyInfo& proxy) {
-    RTC_DCHECK_NOTREACHED();
-    user_agent_ = std::string(user_agent);
-    proxy_ = proxy;
-  }
-  [[deprecated]] const std::string& user_agent() override {
-    RTC_DCHECK_NOTREACHED();
-    return user_agent_;
-  }
-  [[deprecated]] const rtc::ProxyInfo& proxy() override {
-    RTC_DCHECK_NOTREACHED();
-    return proxy_;
-  }
-
   void EnablePortPackets() override;
 
   // Called if the port has no connections and is no longer useful.
@@ -506,9 +491,6 @@
   IceRole ice_role_;
   uint64_t tiebreaker_;
   bool shared_socket_;
-  // Information to use when going through a proxy.
-  std::string user_agent_;
-  rtc::ProxyInfo proxy_;
 
   // A virtual cost perceived by the user, usually based on the network type
   // (WiFi. vs. Cellular). It takes precedence over the priority when
diff --git a/p2p/base/port_interface.h b/p2p/base/port_interface.h
index 8801d97..4818982 100644
--- a/p2p/base/port_interface.h
+++ b/p2p/base/port_interface.h
@@ -23,7 +23,6 @@
 #include "p2p/base/transport_description.h"
 #include "rtc_base/async_packet_socket.h"
 #include "rtc_base/callback_list.h"
-#include "rtc_base/proxy_info.h"
 #include "rtc_base/socket_address.h"
 
 namespace rtc {
@@ -154,10 +153,6 @@
 
   // The factory used to create the sockets of this port.
   virtual rtc::PacketSocketFactory* socket_factory() const = 0;
-  [[deprecated("Unsupported function")]] virtual const std::string&
-  user_agent() = 0;
-  [[deprecated("Unsupported function")]] virtual const rtc::ProxyInfo&
-  proxy() = 0;
 
   // Identifies the generation that this port was created in.
   virtual uint32_t generation() const = 0;
diff --git a/p2p/base/port_unittest.cc b/p2p/base/port_unittest.cc
index 8119002..81066cf 100644
--- a/p2p/base/port_unittest.cc
+++ b/p2p/base/port_unittest.cc
@@ -59,7 +59,6 @@
 #include "rtc_base/network/received_packet.h"
 #include "rtc_base/network/sent_packet.h"
 #include "rtc_base/network_constants.h"
-#include "rtc_base/proxy_info.h"
 #include "rtc_base/socket.h"
 #include "rtc_base/socket_adapters.h"
 #include "rtc_base/socket_address.h"
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index 6d52046..c582863 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -1386,12 +1386,6 @@
   sources = [ "dscp.h" ]
 }
 
-rtc_library("proxy_info") {
-  visibility = [ "*" ]
-  sources = [ "proxy_info.h" ]
-  deps = []
-}
-
 rtc_library("file_rotating_stream") {
   sources = [
     "file_rotating_stream.cc",
diff --git a/rtc_base/proxy_info.h b/rtc_base/proxy_info.h
deleted file mode 100644
index a12ae19..0000000
--- a/rtc_base/proxy_info.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *  Copyright 2004 The WebRTC Project Authors. All rights reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree. An additional intellectual property rights grant can be found
- *  in the file PATENTS.  All contributing project authors may
- *  be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef RTC_BASE_PROXY_INFO_H_
-#define RTC_BASE_PROXY_INFO_H_
-
-namespace rtc {
-// TODO(tommi): Remove.
-struct ProxyInfo {};
-
-}  // namespace rtc
-
-#endif  // RTC_BASE_PROXY_INFO_H_