diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-05-03 13:42:47 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-05-15 10:27:51 +0000 |
commit | 8c5c43c7b138c9b4b0bf56d946e61d3bbc111bec (patch) | |
tree | d29d987c4d7b173cf853279b79a51598f104b403 /chromium/services/network/proxy_resolving_client_socket_factory.h | |
parent | 830c9e163d31a9180fadca926b3e1d7dfffb5021 (diff) | |
download | qtwebengine-chromium-8c5c43c7b138c9b4b0bf56d946e61d3bbc111bec.tar.gz |
BASELINE: Update Chromium to 66.0.3359.156
Change-Id: I0c9831ad39911a086b6377b16f995ad75a51e441
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'chromium/services/network/proxy_resolving_client_socket_factory.h')
-rw-r--r-- | chromium/services/network/proxy_resolving_client_socket_factory.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/chromium/services/network/proxy_resolving_client_socket_factory.h b/chromium/services/network/proxy_resolving_client_socket_factory.h new file mode 100644 index 00000000000..f722d06329f --- /dev/null +++ b/chromium/services/network/proxy_resolving_client_socket_factory.h @@ -0,0 +1,56 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef SERVICES_NETWORK_PROXY_RESOLVING_CLIENT_SOCKET_FACTORY_H_ +#define SERVICES_NETWORK_PROXY_RESOLVING_CLIENT_SOCKET_FACTORY_H_ + +#include <memory> + +#include "base/component_export.h" +#include "base/macros.h" +#include "base/memory/ref_counted.h" +#include "net/ssl/ssl_config.h" +#include "url/gurl.h" + +namespace net { +class ClientSocketFactory; +class HttpNetworkSession; +class URLRequestContext; +} // namespace net + +namespace network { + +class ProxyResolvingClientSocket; + +class COMPONENT_EXPORT(NETWORK_SERVICE) ProxyResolvingClientSocketFactory { + public: + // Constructs a new ProxyResolvingClientSocket. |socket_factory| is the + // ClientSocketFactory that will be used by the underlying HttpNetworkSession. + // If |socket_factory| is nullptr, the default socket factory + // (net::ClientSocketFactory::GetDefaultFactory()) will be used. + // |request_context| must outlive |this| and all sockets |this| creates. + ProxyResolvingClientSocketFactory(net::ClientSocketFactory* socket_factory, + net::URLRequestContext* request_context); + ~ProxyResolvingClientSocketFactory(); + + // Creates a socket. |url|'s host and port specify where a connection will be + // established to. The full URL will be only used for proxy resolution. Caller + // doesn't need to explicitly sanitize the url, any sensitive data (like + // embedded usernames and passwords), and local data (i.e. reference fragment) + // will be sanitized by net::ProxyService::ResolveProxyHelper() before the url + // is disclosed to the proxy. + std::unique_ptr<ProxyResolvingClientSocket> CreateSocket( + const net::SSLConfig& ssl_config, + const GURL& url); + + private: + std::unique_ptr<net::HttpNetworkSession> network_session_; + net::URLRequestContext* request_context_; + + DISALLOW_COPY_AND_ASSIGN(ProxyResolvingClientSocketFactory); +}; + +} // namespace network + +#endif // SERVICES_NETWORK_PROXY_RESOLVING_CLIENT_SOCKET_FACTORY_H_ |