Index: net/base/stream_listen_socket.h |
diff --git a/net/base/stream_listen_socket.h b/net/base/stream_listen_socket.h |
index 8b71b52edf36ba11433bd2eca581e81aa7617be9..03fee87be67af13d638675c6182359bfb9d9bd4a 100644 |
--- a/net/base/stream_listen_socket.h |
+++ b/net/base/stream_listen_socket.h |
@@ -132,6 +132,17 @@ class NET_EXPORT StreamListenSocket |
DISALLOW_COPY_AND_ASSIGN(StreamListenSocket); |
}; |
+// Abstract factory that must be subclassed for each subclass of |
+// StreamListenSocket. |
+class StreamListenSocketFactory { |
+public: |
pfeldman
2012/05/14 11:12:00
Space before public is missing.
Philippe
2012/05/14 12:36:52
I've been fighting against my VIM on that for a co
|
+ virtual ~StreamListenSocketFactory() {} |
+ |
+ // Returns a new instance of StreamListenSocket or NULL if an error occurred. |
+ virtual scoped_refptr<StreamListenSocket> CreateAndListen( |
pfeldman
2012/05/14 11:12:00
Why scoped_refptr?
Philippe
2012/05/14 12:36:52
Only for consistency with the existing CreateAndLi
mmenke
2012/05/14 20:45:19
The advantage of explicitly returning a scoped_ref
Philippe
2012/05/15 14:39:09
I made TCPListenSocket's destructor private and ad
|
+ StreamListenSocket::Delegate* delegate) = 0; |
+}; |
+ |
} // namespace net |
#endif // NET_BASE_STREAM_LISTEN_SOCKET_H_ |