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

Unified Diff: net/base/stream_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/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_

Powered by Google App Engine
This is Rietveld 408576698