Index: net/socket/tcp_listen_socket.cc |
diff --git a/net/socket/tcp_listen_socket.cc b/net/socket/tcp_listen_socket.cc |
index 585c41292de43f3dd0e1269930e039cc4c32f42a..11b23908ab10f8a0c04f452d5768a0734c5cd836 100644 |
--- a/net/socket/tcp_listen_socket.cc |
+++ b/net/socket/tcp_listen_socket.cc |
@@ -31,7 +31,9 @@ namespace net { |
// static |
scoped_ptr<TCPListenSocket> TCPListenSocket::CreateAndListen( |
- const string& ip, int port, StreamListenSocket::Delegate* del) { |
+ const string& ip, |
+ uint16 port, |
+ StreamListenSocket::Delegate* del) { |
SocketDescriptor s = CreateAndBind(ip, port); |
if (s == kInvalidSocket) |
return scoped_ptr<TCPListenSocket>(); |
@@ -47,7 +49,7 @@ TCPListenSocket::TCPListenSocket(SocketDescriptor s, |
TCPListenSocket::~TCPListenSocket() {} |
-SocketDescriptor TCPListenSocket::CreateAndBind(const string& ip, int port) { |
+SocketDescriptor TCPListenSocket::CreateAndBind(const string& ip, uint16 port) { |
SocketDescriptor s = CreatePlatformSocket(AF_INET, SOCK_STREAM, IPPROTO_TCP); |
if (s != kInvalidSocket) { |
#if defined(OS_POSIX) |
@@ -74,7 +76,7 @@ SocketDescriptor TCPListenSocket::CreateAndBind(const string& ip, int port) { |
} |
SocketDescriptor TCPListenSocket::CreateAndBindAnyPort(const string& ip, |
- int* port) { |
+ uint16* port) { |
SocketDescriptor s = CreateAndBind(ip, 0); |
if (s == kInvalidSocket) |
return kInvalidSocket; |
@@ -110,16 +112,4 @@ void TCPListenSocket::Accept() { |
socket_delegate_->DidAccept(this, sock.Pass()); |
} |
-TCPListenSocketFactory::TCPListenSocketFactory(const string& ip, int port) |
- : ip_(ip), |
- port_(port) { |
-} |
- |
-TCPListenSocketFactory::~TCPListenSocketFactory() {} |
- |
-scoped_ptr<StreamListenSocket> TCPListenSocketFactory::CreateAndListen( |
- StreamListenSocket::Delegate* delegate) const { |
- return TCPListenSocket::CreateAndListen(ip_, port_, delegate); |
-} |
- |
} // namespace net |