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}
This commit is contained in:
Tommi 2024-04-17 14:06:10 +02:00 committed by WebRTC LUCI CQ
parent cca6ceeb44
commit f54e0133d7
10 changed files with 1 additions and 82 deletions

View file

@ -429,7 +429,6 @@ rtc_source_set("packet_socket_factory") {
deps = [
":async_dns_resolver",
"../rtc_base:async_packet_socket",
"../rtc_base:proxy_info",
"../rtc_base:socket_address",
"../rtc_base/system:rtc_export",
]

View file

@ -97,7 +97,6 @@ specific_include_rules = {
],
"packet_socket_factory\.h": [
"+rtc_base/proxy_info.h",
"+rtc_base/async_packet_socket.h",
],

View file

@ -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 @@ class RTC_EXPORT PacketSocketFactory {
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;

View file

@ -127,7 +127,6 @@ rtc_library("rtc_p2p") {
"../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_library("basic_packet_socket_factory") {
"../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_library("connection") {
"../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_library("port") {
"../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 @@ rtc_library("port_allocator") {
"../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 @@ rtc_library("port_interface") {
"../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 @@ if (rtc_include_tests) {
"../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",

View file

@ -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"

View file

@ -322,21 +322,6 @@ class RTC_EXPORT Port : public PortInterface, public sigslot::has_slots<> {
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 @@ class RTC_EXPORT Port : public PortInterface, public sigslot::has_slots<> {
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

View file

@ -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 @@ class PortInterface {
// 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;

View file

@ -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"

View file

@ -1386,12 +1386,6 @@ rtc_library("dscp") {
sources = [ "dscp.h" ]
}
rtc_library("proxy_info") {
visibility = [ "*" ]
sources = [ "proxy_info.h" ]
deps = []
}
rtc_library("file_rotating_stream") {
sources = [
"file_rotating_stream.cc",

View file

@ -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_