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

Unified Diff: net/socket/tcp_listen_socket.h

Issue 20142003: Remove ref-counting from StreamListenSocket (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixup Created 7 years, 5 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/socket/tcp_listen_socket.h
diff --git a/net/socket/tcp_listen_socket.h b/net/socket/tcp_listen_socket.h
index dbc5347e945c6fad26db8c4353cd49d46b7ace31..d835265a50f40bef51c6d2f3dac834c84fb37b36 100644
--- a/net/socket/tcp_listen_socket.h
+++ b/net/socket/tcp_listen_socket.h
@@ -8,7 +8,6 @@
#include <string>
#include "base/basictypes.h"
-#include "base/memory/ref_counted.h"
#include "net/base/net_export.h"
#include "net/socket/stream_listen_socket.h"
@@ -17,9 +16,10 @@ namespace net {
// Implements a TCP socket. Note that this is ref counted.
akalin 2013/08/30 20:53:02 update comment
szym 2013/08/30 22:08:01 Done.
class NET_EXPORT TCPListenSocket : public StreamListenSocket {
public:
+ virtual ~TCPListenSocket();
// Listen on port for the specified IP address. Use 127.0.0.1 to only
// accept local connections.
- static scoped_refptr<TCPListenSocket> CreateAndListen(
+ static scoped_ptr<TCPListenSocket> CreateAndListen(
const std::string& ip, int port, StreamListenSocket::Delegate* del);
// Get raw TCP socket descriptor bound to ip:port.
@@ -30,10 +30,7 @@ class NET_EXPORT TCPListenSocket : public StreamListenSocket {
int* port);
protected:
- friend class scoped_refptr<TCPListenSocket>;
-
TCPListenSocket(SocketDescriptor s, StreamListenSocket::Delegate* del);
- virtual ~TCPListenSocket();
// Implements StreamListenSocket::Accept.
virtual void Accept() OVERRIDE;
@@ -49,7 +46,7 @@ class NET_EXPORT TCPListenSocketFactory : public StreamListenSocketFactory {
virtual ~TCPListenSocketFactory();
// StreamListenSocketFactory overrides.
- virtual scoped_refptr<StreamListenSocket> CreateAndListen(
+ virtual scoped_ptr<StreamListenSocket> CreateAndListen(
StreamListenSocket::Delegate* delegate) const OVERRIDE;
private:

Powered by Google App Engine
This is Rietveld 408576698