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

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: Sync 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
« no previous file with comments | « net/base/stream_listen_socket.h ('k') | net/base/tcp_listen_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/tcp_listen_socket.h
diff --git a/net/base/tcp_listen_socket.h b/net/base/tcp_listen_socket.h
index 0e42299431ae01248bc75dd80946b483e933b47c..6691b5f8d818b5e2fbdf6221f6837358ee8f3071 100644
--- a/net/base/tcp_listen_socket.h
+++ b/net/base/tcp_listen_socket.h
@@ -24,6 +24,8 @@ class NET_EXPORT TCPListenSocket : public StreamListenSocket {
const std::string& ip, int port, StreamListenSocket::Delegate* del);
protected:
+ friend class scoped_refptr<TCPListenSocket>;
+
TCPListenSocket(SOCKET s, StreamListenSocket::Delegate* del);
virtual ~TCPListenSocket();
@@ -36,6 +38,23 @@ 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);
+ virtual ~TCPListenSocketFactory();
+
+ // StreamListenSocketFactory overrides.
+ virtual scoped_refptr<StreamListenSocket> CreateAndListen(
+ StreamListenSocket::Delegate* delegate) const OVERRIDE;
+
+ private:
+ const std::string ip_;
+ const int port_;
+
+ DISALLOW_COPY_AND_ASSIGN(TCPListenSocketFactory);
+};
+
} // namespace net
#endif // NET_BASE_TCP_LISTEN_SOCKET_H_
« no previous file with comments | « net/base/stream_listen_socket.h ('k') | net/base/tcp_listen_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698