Chromium Code Reviews| Index: net/base/host_port_pair.cc |
| diff --git a/net/base/host_port_pair.cc b/net/base/host_port_pair.cc |
| index 773c7ee49b6b49b26adbc67dd5d6948e4b57a405..db751f6eef51f959c8a164bb3e3f3bdbd935a469 100644 |
| --- a/net/base/host_port_pair.cc |
| +++ b/net/base/host_port_pair.cc |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| @@ -9,8 +9,8 @@ |
| #include "base/string_util.h" |
| #include "base/stringprintf.h" |
| #include "googleurl/src/gurl.h" |
| +#include "net/base/ip_endpoint.h" |
| #include "net/base/net_util.h" |
|
eroman
2012/05/04 01:08:41
Can this be deleted now?
szym
2012/05/04 02:38:29
Yes!
|
| -#include "net/base/sys_addrinfo.h" |
| namespace net { |
| @@ -24,9 +24,8 @@ HostPortPair HostPortPair::FromURL(const GURL& url) { |
| } |
| // static |
| -HostPortPair HostPortPair::FromAddrInfo(const struct addrinfo* ai) { |
| - return HostPortPair(NetAddressToString(ai), |
| - GetPortFromSockaddr(ai->ai_addr, ai->ai_addrlen)); |
| +HostPortPair HostPortPair::FromIPEndPoint(const IPEndPoint& ipe) { |
| + return HostPortPair(ipe.ToStringWithoutPort(), ipe.port()); |
| } |
| HostPortPair HostPortPair::FromString(const std::string& str) { |