Commit a3310dae authored by Maks Orlovich's avatar Maks Orlovich Committed by Commit Bot

ProxyResolvingSocket: Some small cleanups

This is an application of review feedback from
https://chromium-review.googlesource.com/c/chromium/src/+/1310638
... that I somehow managed to forget to upload.

Change-Id: I972d4e5a8722d0f3ef2684587cdb4911636c1575
Reviewed-on: https://chromium-review.googlesource.com/c/1318358Reviewed-by: default avatarTom Sepez <tsepez@chromium.org>
Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Commit-Queue: Maks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605799}
parent 520a6069
...@@ -32,9 +32,11 @@ void ProxyResolvingSocketFactoryMojo::CreateProxyResolvingSocket( ...@@ -32,9 +32,11 @@ void ProxyResolvingSocketFactoryMojo::CreateProxyResolvingSocket(
CreateProxyResolvingSocketCallback callback) { CreateProxyResolvingSocketCallback callback) {
std::unique_ptr<net::StreamSocket> net_socket = std::unique_ptr<net::StreamSocket> net_socket =
factory_impl_.CreateSocket(url, options && options->use_tls); factory_impl_.CreateSocket(url, options && options->use_tls);
if (options && options->fake_tls_handshake) if (options && options->fake_tls_handshake) {
DCHECK(!options->use_tls);
net_socket = std::make_unique<jingle_glue::FakeSSLClientSocket>( net_socket = std::make_unique<jingle_glue::FakeSSLClientSocket>(
std::move(net_socket)); std::move(net_socket));
}
auto socket = std::make_unique<ProxyResolvingSocketMojo>( auto socket = std::make_unique<ProxyResolvingSocketMojo>(
std::move(net_socket), std::move(net_socket),
......
...@@ -43,6 +43,7 @@ struct ProxyResolvingSocketOptions { ...@@ -43,6 +43,7 @@ struct ProxyResolvingSocketOptions {
// Tries to do a fake TLS handshake on the connection. // Tries to do a fake TLS handshake on the connection.
// This is sometimes used with XMPP to pass through proxies. // This is sometimes used with XMPP to pass through proxies.
// See jingle_glue::FakeSSLClientSocket for more details. // See jingle_glue::FakeSSLClientSocket for more details.
// Should not be used with |use_tls| set to true.
bool fake_tls_handshake = false; bool fake_tls_handshake = false;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment