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

Unified Diff: net/socket/tcp_server_socket_unittest.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/socket/tcp_server_socket_libevent.cc ('k') | net/socket/tcp_server_socket_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_server_socket_unittest.cc
diff --git a/net/socket/tcp_server_socket_unittest.cc b/net/socket/tcp_server_socket_unittest.cc
index 9307297d9325b66c9ebaf761b2a4293f6dcda5be..a384b7076d8536d679baab92628935459cf5a611 100644
--- a/net/socket/tcp_server_socket_unittest.cc
+++ b/net/socket/tcp_server_socket_unittest.cc
@@ -14,7 +14,6 @@
#include "net/base/io_buffer.h"
#include "net/base/ip_endpoint.h"
#include "net/base/net_errors.h"
-#include "net/base/sys_addrinfo.h"
#include "net/base/test_completion_callback.h"
#include "net/socket/tcp_client_socket.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -62,15 +61,11 @@ class TCPServerSocketTest : public PlatformTest {
static IPEndPoint GetPeerAddress(StreamSocket* socket) {
AddressList address;
EXPECT_EQ(OK, socket->GetPeerAddress(&address));
- IPEndPoint endpoint;
- EXPECT_TRUE(endpoint.FromSockAddr(
- address.head()->ai_addr, address.head()->ai_addrlen));
- return endpoint;
+ return address.front();
}
AddressList local_address_list() const {
- return AddressList::CreateFromIPAddress(
- local_address_.address(), local_address_.port());
+ return AddressList(local_address_);
}
TCPServerSocket socket_;
« no previous file with comments | « net/socket/tcp_server_socket_libevent.cc ('k') | net/socket/tcp_server_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698