Chromium Code Reviews| Index: net/base/net_util.h |
| diff --git a/net/base/net_util.h b/net/base/net_util.h |
| index 839735e5cd5eeb87f91fc21a3a3a4f5927ed192b..a7e58135b8975618ac9ac17a12bc4e3211296d0f 100644 |
| --- a/net/base/net_util.h |
| +++ b/net/base/net_util.h |
| @@ -112,12 +112,15 @@ NET_EXPORT std::string GetHostAndPort(const GURL& url); |
| NET_EXPORT_PRIVATE std::string GetHostAndOptionalPort(const GURL& url); |
| // Returns true if |hostname| contains a non-registerable or non-assignable |
| -// domain name (eg: a gTLD that has not been assigned by IANA) |
| -// |
| -// TODO(rsleevi): http://crbug.com/119212 - Also match internal IP |
| -// address ranges. |
| +// domain name (eg: a gTLD that has not been assigned by IANA) or an IP address |
| +// that falls in an IANA-reserved range. |
| NET_EXPORT bool IsHostnameNonUnique(const std::string& hostname); |
| +// Returns true if an IP address hostname is in a range reserved by the IANA. |
| +// Works with both IPv4 and IPv6 addresses, but you must specify which type |
| +// you're checking. |
| +NET_EXPORT bool IsIPAddressReserved(const std::string& address, bool ipv4); |
|
Ryan Sleevi
2013/08/07 19:04:44
std::string -> base::StringPiece (so it can easily
felt
2013/08/08 19:35:33
I actually changed this to take an IPAddressNumber
|
| + |
| // Convenience struct for when you need a |struct sockaddr|. |
| struct SockaddrStorage { |
| SockaddrStorage() : addr_len(sizeof(addr_storage)), |