socket: Support NetworkIsolationKey in RawConnect

This commit is contained in:
klzgrad 2020-05-21 22:19:54 +08:00
parent 6a791df12e
commit d9bf3636ed
2 changed files with 15 additions and 12 deletions

View File

@ -289,7 +289,8 @@ int InitSocketHandleForWebSocketRequest(
proxy_auth_callback); proxy_auth_callback);
} }
int InitSocketHandleForRawConnect2(const HostPortPair& endpoint, int InitSocketHandleForRawConnect2(
const HostPortPair& endpoint,
HttpNetworkSession* session, HttpNetworkSession* session,
int request_load_flags, int request_load_flags,
RequestPriority request_priority, RequestPriority request_priority,
@ -297,6 +298,7 @@ int InitSocketHandleForRawConnect2(const HostPortPair& endpoint,
const SSLConfig& ssl_config_for_origin, const SSLConfig& ssl_config_for_origin,
const SSLConfig& ssl_config_for_proxy, const SSLConfig& ssl_config_for_proxy,
PrivacyMode privacy_mode, PrivacyMode privacy_mode,
const NetworkIsolationKey& network_isolation_key,
const NetLogWithSource& net_log, const NetLogWithSource& net_log,
ClientSocketHandle* socket_handle, ClientSocketHandle* socket_handle,
CompletionOnceCallback callback) { CompletionOnceCallback callback) {
@ -305,7 +307,7 @@ int InitSocketHandleForRawConnect2(const HostPortPair& endpoint,
ClientSocketPoolManager::NORMAL_GROUP, endpoint, request_load_flags, ClientSocketPoolManager::NORMAL_GROUP, endpoint, request_load_flags,
request_priority, session, proxy_info, ssl_config_for_origin, request_priority, session, proxy_info, ssl_config_for_origin,
ssl_config_for_proxy, /*is_for_websockets=*/true, privacy_mode, 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, 0, socket_handle, HttpNetworkSession::NORMAL_SOCKET_POOL,
std::move(callback), ClientSocketPool::ProxyAuthCallback()); std::move(callback), ClientSocketPool::ProxyAuthCallback());
} }

View File

@ -151,6 +151,7 @@ NET_EXPORT int InitSocketHandleForRawConnect2(
const SSLConfig& ssl_config_for_origin, const SSLConfig& ssl_config_for_origin,
const SSLConfig& ssl_config_for_proxy, const SSLConfig& ssl_config_for_proxy,
PrivacyMode privacy_mode, PrivacyMode privacy_mode,
const NetworkIsolationKey& network_isolation_key,
const NetLogWithSource& net_log, const NetLogWithSource& net_log,
ClientSocketHandle* socket_handle, ClientSocketHandle* socket_handle,
CompletionOnceCallback callback); CompletionOnceCallback callback);