Chromium Code Reviews| Index: net/base/host_port_pair.h |
| diff --git a/net/base/host_port_pair.h b/net/base/host_port_pair.h |
| index 2c7bb9ff9cd24ddbcd601eeb8465701b1f57c3df..7488e6c53c0c026665e7e6e8ab21cf5640481ea5 100644 |
| --- a/net/base/host_port_pair.h |
| +++ b/net/base/host_port_pair.h |
| @@ -9,6 +9,7 @@ |
| #include <string> |
| #include "base/basictypes.h" |
| +struct addrinfo; |
| class GURL; |
| namespace net { |
| @@ -22,6 +23,9 @@ class HostPortPair { |
| // Creates a HostPortPair for the origin of |url|. |
| static HostPortPair FromURL(const GURL& url); |
| + // Creates a HostPortPair from an addrinfo struct. |
| + static HostPortPair FromAddrInfo(const struct addrinfo* ai); |
|
eroman
2011/02/18 02:48:30
You might consider having this operate on the head
Brian Ryner
2011/02/18 04:41:59
I think I'll stick with addrinfo, since it's a lit
|
| + |
| // TODO(willchan): Define a functor instead. |
| // Comparator function so this can be placed in a std::map. |
| bool operator<(const HostPortPair& other) const { |