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

Unified Diff: net/socket/tcp_listen_socket.cc

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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_listen_socket.h ('k') | net/socket/tcp_server_socket_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « net/socket/tcp_listen_socket.h ('k') | net/socket/tcp_server_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698