Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(862)

Unified Diff: net/base/network_interfaces_win.cc

Issue 1565303002: Change IPEndpoint::address() to return a net::IPAddress (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/base/network_interfaces_win.cc
diff --git a/net/base/network_interfaces_win.cc b/net/base/network_interfaces_win.cc
index e8480d2cd3e4699614fd47d1a60964f5738b4289..5b26f27f5886374dc96917eaa1b24f305e6584fb 100644
--- a/net/base/network_interfaces_win.cc
+++ b/net/base/network_interfaces_win.cc
@@ -182,10 +182,11 @@ bool GetNetworkListImpl(NetworkInterfaceList* networks,
int prefix_family = prefix->Address.lpSockaddr->sa_family;
IPEndPoint network_endpoint;
if (prefix_family == family &&
- network_endpoint.FromSockAddr(prefix->Address.lpSockaddr,
+ network_endpoint.FromSockAddr(
+ prefix->Address.lpSockaddr,
prefix->Address.iSockaddrLength) &&
- IPNumberMatchesPrefix(endpoint.address(),
- network_endpoint.address(),
+ IPNumberMatchesPrefix(endpoint.address_number(),
+ network_endpoint.address_number(),
prefix->PrefixLength)) {
prefix_length =
std::max<size_t>(prefix_length, prefix->PrefixLength);
@@ -219,8 +220,8 @@ bool GetNetworkListImpl(NetworkInterfaceList* networks,
networks->push_back(NetworkInterface(
adapter->AdapterName,
base::SysWideToNativeMB(adapter->FriendlyName), index,
- GetNetworkInterfaceType(adapter->IfType), endpoint.address(),
- prefix_length, ip_address_attributes));
+ GetNetworkInterfaceType(adapter->IfType),
+ endpoint.address_number(), prefix_length, ip_address_attributes));
}
}
}

Powered by Google App Engine
This is Rietveld 408576698