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

Unified Diff: net/base/tcp_listen_socket.h

Issue 10386048: Decouple DevTools from socket implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Pavel's comments 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
Index: net/base/tcp_listen_socket.h
diff --git a/net/base/tcp_listen_socket.h b/net/base/tcp_listen_socket.h
index fed1df36689d7b2f67a8728a4af981b7ff3a614b..5250d3a786173ac8f97ff2acb29851c71f3cb9b1 100644
--- a/net/base/tcp_listen_socket.h
+++ b/net/base/tcp_listen_socket.h
@@ -39,6 +39,23 @@ class NET_EXPORT TCPListenSocket : public StreamListenSocket {
DISALLOW_COPY_AND_ASSIGN(TCPListenSocket);
};
+// Factory that can be used to instantiate TCPListenSocket.
+class TCPListenSocketFactory : public StreamListenSocketFactory {
+ public:
+ TCPListenSocketFactory(const std::string& ip, int port);
+ virtual ~TCPListenSocketFactory();
+
+ // StreamListenSocketFactory overrides.
+ virtual scoped_refptr<StreamListenSocket> CreateAndListen(
+ StreamListenSocket::Delegate* delegate) OVERRIDE;
+
+ private:
+ const std::string ip_;
+ const int port_;
+
+ DISALLOW_COPY_AND_ASSIGN(TCPListenSocketFactory);
+};
+
} // namespace net
#endif // NET_BASE_TCP_LISTEN_SOCKET_H_

Powered by Google App Engine
This is Rietveld 408576698