From b419f7fe8391249a6ac2dbb12dd7f73203aae9d2 Mon Sep 17 00:00:00 2001 From: klzgrad Date: Thu, 21 May 2020 22:19:54 +0800 Subject: [PATCH] socket: Support NetworkIsolationKey in RawConnect --- src/net/socket/client_socket_pool_manager.cc | 26 +++++++++++--------- src/net/socket/client_socket_pool_manager.h | 1 + 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/net/socket/client_socket_pool_manager.cc b/src/net/socket/client_socket_pool_manager.cc index f95f944f25..9b73d318ab 100644 --- a/src/net/socket/client_socket_pool_manager.cc +++ b/src/net/socket/client_socket_pool_manager.cc @@ -289,23 +289,25 @@ int InitSocketHandleForWebSocketRequest( proxy_auth_callback); } -int InitSocketHandleForRawConnect2(const HostPortPair& endpoint, - HttpNetworkSession* session, - int request_load_flags, - RequestPriority request_priority, - const ProxyInfo& proxy_info, - const SSLConfig& ssl_config_for_origin, - const SSLConfig& ssl_config_for_proxy, - PrivacyMode privacy_mode, - const NetLogWithSource& net_log, - ClientSocketHandle* socket_handle, - CompletionOnceCallback callback) { +int InitSocketHandleForRawConnect2( + const HostPortPair& endpoint, + HttpNetworkSession* session, + int request_load_flags, + RequestPriority request_priority, + const ProxyInfo& proxy_info, + const SSLConfig& ssl_config_for_origin, + const SSLConfig& ssl_config_for_proxy, + PrivacyMode privacy_mode, + const NetworkIsolationKey& network_isolation_key, + const NetLogWithSource& net_log, + ClientSocketHandle* socket_handle, + CompletionOnceCallback callback) { DCHECK(socket_handle); return InitSocketPoolHelper( ClientSocketPoolManager::NORMAL_GROUP, endpoint, request_load_flags, request_priority, session, proxy_info, ssl_config_for_origin, ssl_config_for_proxy, /*is_for_websockets=*/true, privacy_mode, - NetworkIsolationKey(), /*disable_secure_dns=*/true, SocketTag(), net_log, + network_isolation_key, /*disable_secure_dns=*/true, SocketTag(), net_log, 0, socket_handle, HttpNetworkSession::NORMAL_SOCKET_POOL, std::move(callback), ClientSocketPool::ProxyAuthCallback()); } diff --git a/src/net/socket/client_socket_pool_manager.h b/src/net/socket/client_socket_pool_manager.h index 7719040200..d3c3cf3ba3 100644 --- a/src/net/socket/client_socket_pool_manager.h +++ b/src/net/socket/client_socket_pool_manager.h @@ -151,6 +151,7 @@ NET_EXPORT int InitSocketHandleForRawConnect2( const SSLConfig& ssl_config_for_origin, const SSLConfig& ssl_config_for_proxy, PrivacyMode privacy_mode, + const NetworkIsolationKey& network_isolation_key, const NetLogWithSource& net_log, ClientSocketHandle* socket_handle, CompletionOnceCallback callback);