From bfe876afcdce52180124c1487e75de0e1f0390b5 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 27 Feb 2019 13:37:58 +0530 Subject: [PATCH] Use IPEndPoint instead of HostPortPair https://chromium-review.googlesource.com/c/chromium/src/+/1473094 --- atom/browser/net/atom_network_delegate.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/atom/browser/net/atom_network_delegate.cc b/atom/browser/net/atom_network_delegate.cc index e84fae260caa..437c7c841509 100644 --- a/atom/browser/net/atom_network_delegate.cc +++ b/atom/browser/net/atom_network_delegate.cc @@ -149,9 +149,8 @@ void ToDictionary(base::DictionaryValue* details, const GURL& location) { } void ToDictionary(base::DictionaryValue* details, - const net::HostPortPair& host_port) { - if (host_port.host().empty()) - details->SetString("ip", host_port.host()); + const net::IPEndPoint& remote_endpoint) { + details->SetString("ip", remote_endpoint.ToStringWithoutPort()); } void ToDictionary(base::DictionaryValue* details, bool from_cache) { @@ -328,9 +327,9 @@ void AtomNetworkDelegate::OnBeforeRedirect(net::URLRequest* request, if (!base::ContainsKey(simple_listeners_, kOnBeforeRedirect)) return; - HandleSimpleEvent(kOnBeforeRedirect, request, new_location, - request->response_headers(), request->GetSocketAddress(), - request->was_cached()); + HandleSimpleEvent( + kOnBeforeRedirect, request, new_location, request->response_headers(), + request->GetResponseRemoteEndpoint(), request->was_cached()); } void AtomNetworkDelegate::OnResponseStarted(net::URLRequest* request,