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

Unified Diff: net/socket/transport_client_socket_unittest.cc

Issue 10108015: Upstream changes making ListenSocket an abstract class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add listen_socket.cc. 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
« no previous file with comments | « net/server/http_server.cc ('k') | net/tools/fetch/http_listen_socket.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/transport_client_socket_unittest.cc
diff --git a/net/socket/transport_client_socket_unittest.cc b/net/socket/transport_client_socket_unittest.cc
index 4ba4c000a0a8a14c0f5dbaf3e17888b3de11b0f8..a5e3bb7866a2bbc2815183c6cddf1f1e12106e16 100644
--- a/net/socket/transport_client_socket_unittest.cc
+++ b/net/socket/transport_client_socket_unittest.cc
@@ -5,13 +5,15 @@
#include "net/socket/tcp_client_socket.h"
#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "net/base/address_list.h"
#include "net/base/host_resolver.h"
#include "net/base/io_buffer.h"
-#include "net/base/listen_socket.h"
#include "net/base/net_log.h"
#include "net/base/net_log_unittest.h"
#include "net/base/net_errors.h"
+#include "net/base/tcp_listen_socket.h"
#include "net/base/test_completion_callback.h"
#include "net/base/winsock_init.h"
#include "net/socket/client_socket_factory.h"
@@ -45,7 +47,7 @@ class TransportClientSocketTest
// Implement ListenSocketDelegate methods
virtual void DidAccept(ListenSocket* server, ListenSocket* connection) {
- connected_sock_ = connection;
+ connected_sock_ = reinterpret_cast<TCPListenSocket*>(connection);
}
virtual void DidRead(ListenSocket*, const char* str, int len) {
// TODO(dkegel): this might not be long enough to tickle some bugs.
@@ -90,8 +92,8 @@ class TransportClientSocketTest
scoped_ptr<StreamSocket> sock_;
private:
- scoped_refptr<ListenSocket> listen_sock_;
- scoped_refptr<ListenSocket> connected_sock_;
+ scoped_refptr<TCPListenSocket> listen_sock_;
+ scoped_refptr<TCPListenSocket> connected_sock_;
bool close_server_socket_on_next_send_;
};
@@ -99,7 +101,7 @@ void TransportClientSocketTest::SetUp() {
::testing::TestWithParam<ClientSocketTestTypes>::SetUp();
// Find a free port to listen on
- ListenSocket *sock = NULL;
+ TCPListenSocket *sock = NULL;
int port;
// Range of ports to listen on. Shouldn't need to try many.
const int kMinPort = 10100;
@@ -108,7 +110,7 @@ void TransportClientSocketTest::SetUp() {
EnsureWinsockInit();
#endif
for (port = kMinPort; port < kMaxPort; port++) {
- sock = ListenSocket::Listen("127.0.0.1", port, this);
+ sock = TCPListenSocket::CreateAndListen("127.0.0.1", port, this);
if (sock)
break;
}
« no previous file with comments | « net/server/http_server.cc ('k') | net/tools/fetch/http_listen_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698