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

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: 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 | « chrome/browser/net/network_stats.h ('k') | chrome/browser/ui/webui/net_internals/net_internals_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/network_stats.cc
diff --git a/chrome/browser/net/network_stats.cc b/chrome/browser/net/network_stats.cc
index 897b8cb718074a063d7f1fec2db78ca1ab8dc3bb..f2095f860344f6218dd292477ac96c70fc6b2b6c 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"
@@ -622,14 +621,12 @@ bool UDPStatsClient::DoConnect(int result) {
}
set_socket(udp_socket);
- const addrinfo* address = GetAddressList().head();
- if (!address) {
+ if (addresses().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 = addresses().front();
int rv = udp_socket->Connect(endpoint);
if (rv < 0) {
Finish(CONNECT_FAILED, rv);
@@ -675,7 +672,7 @@ bool TCPStatsClient::DoConnect(int result) {
}
net::TCPClientSocket* tcp_socket =
- new net::TCPClientSocket(GetAddressList(), NULL, net::NetLog::Source());
+ new net::TCPClientSocket(addresses(), NULL, net::NetLog::Source());
if (!tcp_socket) {
Finish(SOCKET_CREATE_FAILED, net::ERR_INVALID_ARGUMENT);
return false;
« no previous file with comments | « chrome/browser/net/network_stats.h ('k') | chrome/browser/ui/webui/net_internals/net_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698