Prepare to move packet_socket_factory to api/.
I gave up on removing proxy_info, user_agent and tcp_options. I don't
think it's feasible to remove them without removing all the proxy code.
The assumption that you can set the proxy and user agent long after
you have created the factory is entrenched in unit tests and the code
itself. So is the ability to set tcp opts depending on protocol or
endpoint properties.
It may be easier to untangle proxy stuff from the factory later,
when it becomes a more first-class citizen and isn't passed via
the allocator.
Requires https://chromium-review.googlesource.com/c/chromium/src/+/1778870
to land first.
Bug: webrtc:7447
Change-Id: Ib496e2bb689ea415e9f8ec1dfedff13a83fa4a8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150799
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29091}
diff --git a/api/peer_connection_interface.h b/api/peer_connection_interface.h
index 124d12a..afa771f 100644
--- a/api/peer_connection_interface.h
+++ b/api/peer_connection_interface.h
@@ -86,6 +86,7 @@
#include "api/media_stream_interface.h"
#include "api/media_transport_interface.h"
#include "api/network_state_predictor.h"
+#include "api/packet_socket_factory.h"
#include "api/rtc_error.h"
#include "api/rtc_event_log/rtc_event_log_factory_interface.h"
#include "api/rtc_event_log_output.h"
@@ -1255,7 +1256,11 @@
// Mandatory dependencies
PeerConnectionObserver* observer = nullptr;
// Optional dependencies
+ // TODO(bugs.webrtc.org/7447): remove port allocator once downstream is
+ // updated. For now, you can only set one of allocator and
+ // packet_socket_factory, not both.
std::unique_ptr<cricket::PortAllocator> allocator;
+ std::unique_ptr<rtc::PacketSocketFactory> packet_socket_factory;
std::unique_ptr<webrtc::AsyncResolverFactory> async_resolver_factory;
std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator;
std::unique_ptr<rtc::SSLCertificateVerifier> tls_cert_verifier;