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

Unified Diff: net/socket/unix_domain_socket_posix.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/transport_client_socket_unittest.cc ('k') | net/socket/unix_domain_socket_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/unix_domain_socket_posix.h
diff --git a/net/socket/unix_domain_socket_posix.h b/net/socket/unix_domain_socket_posix.h
index 2ef06803d24b45e4a3f2ba8e1e7d190980765c44..98d0c11a6487b828214fc38eb8781537025866c4 100644
--- a/net/socket/unix_domain_socket_posix.h
+++ b/net/socket/unix_domain_socket_posix.h
@@ -10,7 +10,6 @@
#include "base/basictypes.h"
#include "base/callback_forward.h"
#include "base/compiler_specific.h"
-#include "base/memory/ref_counted.h"
#include "build/build_config.h"
#include "net/base/net_export.h"
#include "net/socket/stream_listen_socket.h"
@@ -26,6 +25,8 @@ namespace net {
// Unix Domain Socket Implementation. Supports abstract namespaces on Linux.
class NET_EXPORT UnixDomainSocket : public StreamListenSocket {
public:
+ virtual ~UnixDomainSocket();
+
// Callback that returns whether the already connected client, identified by
// its process |user_id| and |group_id|, is allowed to keep the connection
// open. Note that the socket is closed immediately in case the callback
@@ -38,7 +39,7 @@ class NET_EXPORT UnixDomainSocket : public StreamListenSocket {
// Note that the returned UnixDomainSocket instance does not take ownership of
// |del|.
- static scoped_refptr<UnixDomainSocket> CreateAndListen(
+ static scoped_ptr<UnixDomainSocket> CreateAndListen(
const std::string& path,
StreamListenSocket::Delegate* del,
const AuthCallback& auth_callback);
@@ -47,7 +48,7 @@ class NET_EXPORT UnixDomainSocket : public StreamListenSocket {
// Same as above except that the created socket uses the abstract namespace
// which is a Linux-only feature. If |fallback_path| is not empty,
// make the second attempt with the provided fallback name.
- static scoped_refptr<UnixDomainSocket> CreateAndListenWithAbstractNamespace(
+ static scoped_ptr<UnixDomainSocket> CreateAndListenWithAbstractNamespace(
const std::string& path,
const std::string& fallback_path,
StreamListenSocket::Delegate* del,
@@ -58,9 +59,8 @@ class NET_EXPORT UnixDomainSocket : public StreamListenSocket {
UnixDomainSocket(SocketDescriptor s,
StreamListenSocket::Delegate* del,
const AuthCallback& auth_callback);
- virtual ~UnixDomainSocket();
- static UnixDomainSocket* CreateAndListenInternal(
+ static scoped_ptr<UnixDomainSocket> CreateAndListenInternal(
const std::string& path,
const std::string& fallback_path,
StreamListenSocket::Delegate* del,
@@ -87,7 +87,7 @@ class NET_EXPORT UnixDomainSocketFactory : public StreamListenSocketFactory {
virtual ~UnixDomainSocketFactory();
// StreamListenSocketFactory:
- virtual scoped_refptr<StreamListenSocket> CreateAndListen(
+ virtual scoped_ptr<StreamListenSocket> CreateAndListen(
StreamListenSocket::Delegate* delegate) const OVERRIDE;
protected:
@@ -111,7 +111,7 @@ class NET_EXPORT UnixDomainSocketWithAbstractNamespaceFactory
virtual ~UnixDomainSocketWithAbstractNamespaceFactory();
// UnixDomainSocketFactory:
- virtual scoped_refptr<StreamListenSocket> CreateAndListen(
+ virtual scoped_ptr<StreamListenSocket> CreateAndListen(
StreamListenSocket::Delegate* delegate) const OVERRIDE;
private:
« no previous file with comments | « net/socket/transport_client_socket_unittest.cc ('k') | net/socket/unix_domain_socket_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698