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

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: addressed comments Created 7 years, 4 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/socket/stream_listen_socket.h ('k') | net/socket/tcp_listen_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_listen_socket.h
diff --git a/net/socket/tcp_listen_socket.h b/net/socket/tcp_listen_socket.h
index 1756975b11b3e28f64f62df0fb99a1aeef224a08..54a91de59bbb2d1629a293334cbf7849aa50625a 100644
--- a/net/socket/tcp_listen_socket.h
+++ b/net/socket/tcp_listen_socket.h
@@ -8,19 +8,19 @@
#include <string>
#include "base/basictypes.h"
-#include "base/memory/ref_counted.h"
#include "net/base/net_export.h"
#include "net/socket/socket_descriptor.h"
#include "net/socket/stream_listen_socket.h"
namespace net {
-// Implements a TCP socket. Note that this is ref counted.
+// Implements a TCP socket.
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.
@@ -31,10 +31,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;
@@ -50,7 +47,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:
« no previous file with comments | « net/socket/stream_listen_socket.h ('k') | net/socket/tcp_listen_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698