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

Unified Diff: chrome/browser/net/network_stats.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: chrome/browser/net/network_stats.cc
diff --git a/chrome/browser/net/network_stats.cc b/chrome/browser/net/network_stats.cc
index a22e6562f2a3bd85707a45798333597be4ba3718..39a71c95340a5be7ec1b69dc8ec9ed834b666f30 100644
--- a/chrome/browser/net/network_stats.cc
+++ b/chrome/browser/net/network_stats.cc
@@ -19,7 +19,6 @@
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
#include "net/base/network_change_notifier.h"
-#include "net/base/sys_addrinfo.h"
#include "net/base/test_completion_callback.h"
#include "net/socket/tcp_client_socket.h"
#include "net/udp/udp_client_socket.h"
@@ -509,14 +508,12 @@ bool UDPStatsClient::DoConnect(int result) {
}
set_socket(udp_socket);
- const addrinfo* address = GetAddressList().head();
- if (!address) {
+ if (GetAddressList().empty()) {
Finish(RESOLVE_FAILED, net::ERR_INVALID_ARGUMENT);
return false;
}
- net::IPEndPoint endpoint;
- endpoint.FromSockAddr(address->ai_addr, address->ai_addrlen);
+ const net::IPEndPoint& endpoint = GetAddressList().front();
int rv = udp_socket->Connect(endpoint);
if (rv < 0) {
Finish(CONNECT_FAILED, rv);

Powered by Google App Engine
This is Rietveld 408576698