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

Unified Diff: net/base/host_port_pair.cc

Issue 10309002: Reimplements net::AddressList without struct addrinfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing NET_EXPORT to *PortOnAddressList. Created 8 years, 8 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/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) {

Powered by Google App Engine
This is Rietveld 408576698