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

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: get_canonical_name -> canonical_name. iterator to indexing Created 8 years, 7 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
« no previous file with comments | « net/base/host_port_pair.h ('k') | net/base/host_resolver_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..6dbb85579aca856f8649f4973bc0c0dddae9fced 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,7 @@
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "googleurl/src/gurl.h"
-#include "net/base/net_util.h"
-#include "net/base/sys_addrinfo.h"
+#include "net/base/ip_endpoint.h"
namespace net {
@@ -24,9 +23,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) {
« no previous file with comments | « net/base/host_port_pair.h ('k') | net/base/host_resolver_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698