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

Unified Diff: net/dns/dns_config_service_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: Feedback eroman 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/dns/dns_config_service_win.cc
diff --git a/net/dns/dns_config_service_win.cc b/net/dns/dns_config_service_win.cc
index 8c3192d90baf03570927839b39ab4998792cc49f..73bb92caf16d06621e49bd2d8fef41e04665794e 100644
--- a/net/dns/dns_config_service_win.cc
+++ b/net/dns/dns_config_service_win.cc
@@ -281,10 +281,12 @@ HostsParseWinResult AddLocalhostEntries(DnsHosts* hosts) {
}
if (!have_ipv4 && (ipe.GetFamily() == ADDRESS_FAMILY_IPV4)) {
have_ipv4 = true;
- (*hosts)[DnsHostsKey(localname, ADDRESS_FAMILY_IPV4)] = ipe.address();
+ (*hosts)[DnsHostsKey(localname, ADDRESS_FAMILY_IPV4)] =
+ ipe.address().bytes();
} else if (!have_ipv6 && (ipe.GetFamily() == ADDRESS_FAMILY_IPV6)) {
have_ipv6 = true;
- (*hosts)[DnsHostsKey(localname, ADDRESS_FAMILY_IPV6)] = ipe.address();
+ (*hosts)[DnsHostsKey(localname, ADDRESS_FAMILY_IPV6)] =
+ ipe.address().bytes();
}
}
}
@@ -513,11 +515,11 @@ ConfigParseWinResult ConvertSettingsToDnsConfig(
IPEndPoint ipe;
if (ipe.FromSockAddr(address->Address.lpSockaddr,
address->Address.iSockaddrLength)) {
- if (IsStatelessDiscoveryAddress(ipe.address()))
+ if (IsStatelessDiscoveryAddress(ipe.address().bytes()))
continue;
// Override unset port.
if (!ipe.port())
- ipe = IPEndPoint(ipe.address(), dns_protocol::kDefaultPort);
+ ipe = IPEndPoint(ipe.address().bytes(), dns_protocol::kDefaultPort);
config->nameservers.push_back(ipe);
} else {
return CONFIG_PARSE_WIN_BAD_ADDRESS;

Powered by Google App Engine
This is Rietveld 408576698