Index: net/base/net_util.h |
diff --git a/net/base/net_util.h b/net/base/net_util.h |
index f2ba404ffddcb18a6bc433fabe7ad1e2991924d5..92b11c11132cdc4156a43a1609c42776924fa025 100644 |
--- a/net/base/net_util.h |
+++ b/net/base/net_util.h |
@@ -354,6 +354,13 @@ const uint16_t* GetPortFieldFromSockaddr(const struct sockaddr* address, |
NET_EXPORT_PRIVATE int GetPortFromSockaddr(const struct sockaddr* address, |
socklen_t address_len); |
+// Returns true if |host| is one of the names (e.g. "localhost") that |
+// indicate a loopback. Sets |isLocalhost6| to true if |host| is one of |
+// the special names (e.g. "localhost6") that indicates an IPv6 |
+// loopback. |
+NET_EXPORT_PRIVATE bool IsLocalhostHostname(const std::string& host, |
+ bool* isLocalhost6); |
+ |
// Returns true if |host| is one of the names (e.g. "localhost") or IP |
// addresses (IPv4 127.0.0.0/8 or IPv6 ::1) that indicate a loopback. |
// |