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

Unified Diff: net/socket/tcp_listen_socket.h

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/ssl_client_socket_pool_unittest.cc ('k') | net/socket/tcp_listen_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_listen_socket.h
diff --git a/net/socket/tcp_listen_socket.h b/net/socket/tcp_listen_socket.h
index 1702e50e8ed7cae35acaf62f3c5a8b8eac87bd15..01a08a1742429bf5eb6fdc678bd2b979cbbac743 100644
--- a/net/socket/tcp_listen_socket.h
+++ b/net/socket/tcp_listen_socket.h
@@ -21,14 +21,16 @@ class NET_EXPORT TCPListenSocket : public StreamListenSocket {
// Listen on port for the specified IP address. Use 127.0.0.1 to only
// accept local connections.
static scoped_ptr<TCPListenSocket> CreateAndListen(
- const std::string& ip, int port, StreamListenSocket::Delegate* del);
+ const std::string& ip,
+ uint16 port,
+ StreamListenSocket::Delegate* del);
// Get raw TCP socket descriptor bound to ip:port.
- static SocketDescriptor CreateAndBind(const std::string& ip, int port);
+ static SocketDescriptor CreateAndBind(const std::string& ip, uint16 port);
// Get raw TCP socket descriptor bound to ip and return port it is bound to.
static SocketDescriptor CreateAndBindAnyPort(const std::string& ip,
- int* port);
+ uint16* port);
protected:
TCPListenSocket(SocketDescriptor s, StreamListenSocket::Delegate* del);
@@ -40,23 +42,6 @@ class NET_EXPORT TCPListenSocket : public StreamListenSocket {
DISALLOW_COPY_AND_ASSIGN(TCPListenSocket);
};
-// Factory that can be used to instantiate TCPListenSocket.
-class NET_EXPORT TCPListenSocketFactory : public StreamListenSocketFactory {
- public:
- TCPListenSocketFactory(const std::string& ip, int port);
- ~TCPListenSocketFactory() override;
-
- // StreamListenSocketFactory overrides.
- scoped_ptr<StreamListenSocket> CreateAndListen(
- StreamListenSocket::Delegate* delegate) const override;
-
- private:
- const std::string ip_;
- const int port_;
-
- DISALLOW_COPY_AND_ASSIGN(TCPListenSocketFactory);
-};
-
} // namespace net
#endif // NET_SOCKET_TCP_LISTEN_SOCKET_H_
« no previous file with comments | « net/socket/ssl_client_socket_pool_unittest.cc ('k') | net/socket/tcp_listen_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698