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

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: Update 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..8476ab07814d79611ce4e25e9066d4cf6f480adf 100644
--- a/net/base/tcp_listen_socket.h
+++ b/net/base/tcp_listen_socket.h
@@ -39,6 +39,22 @@ class NET_EXPORT TCPListenSocket : public StreamListenSocket {
DISALLOW_COPY_AND_ASSIGN(TCPListenSocket);
};
+// Factory that can be used to instantiate TCPListenSocket.
+class TCPListenSocketFactory : public StreamListenSocketFactory {
+public:
pfeldman 2012/05/14 11:12:00 space before public.
Philippe 2012/05/14 12:36:52 Done.
+ TCPListenSocketFactory(const std::string& ip, int port);
+ virtual ~TCPListenSocketFactory();
+
+ // Returns a new instance of TCPListenSocket created through
pfeldman 2012/05/14 11:12:00 Should be // StreamListenSocketFactory overrides
Philippe 2012/05/14 12:36:52 Done.
+ // TCPListenSocket::CreateAndListen().
+ virtual scoped_refptr<StreamListenSocket> CreateAndListen(
+ StreamListenSocket::Delegate* delegate) OVERRIDE;
+
+private:
+ const std::string ip_;
pfeldman 2012/05/14 11:12:00 DISALLOW_COPY_AND_ASSIGN is missing
Philippe 2012/05/14 12:36:52 I added it although there is nothing here that pre
mmenke 2012/05/14 20:45:19 Copying classes with inheritance scares me.
Philippe 2012/05/15 14:39:09 That's a good point.
+ const int port_;
+};
+
} // namespace net
#endif // NET_BASE_TCP_LISTEN_SOCKET_H_

Powered by Google App Engine
This is Rietveld 408576698