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

Unified Diff: net/socket/unix_domain_server_socket_posix.h

Issue 1892323002: Change scoped_ptr to std::unique_ptr in //net/socket. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/unix_domain_server_socket_posix.h
diff --git a/net/socket/unix_domain_server_socket_posix.h b/net/socket/unix_domain_server_socket_posix.h
index 7395f058ce56d1ca830f20e2e18e9878629247d9..0d52835120bbbf6d4563c6cc317a651b46c64d14 100644
--- a/net/socket/unix_domain_server_socket_posix.h
+++ b/net/socket/unix_domain_server_socket_posix.h
@@ -8,11 +8,11 @@
#include <stdint.h>
#include <sys/types.h>
+#include <memory>
#include <string>
#include "base/callback.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "net/base/net_export.h"
#include "net/socket/server_socket.h"
#include "net/socket/socket_descriptor.h"
@@ -56,7 +56,7 @@ class NET_EXPORT UnixDomainServerSocket : public ServerSocket {
uint16_t port,
int backlog) override;
int GetLocalAddress(IPEndPoint* address) const override;
- int Accept(scoped_ptr<StreamSocket>* socket,
+ int Accept(std::unique_ptr<StreamSocket>* socket,
const CompletionCallback& callback) override;
// Creates a server socket, binds it to the specified |socket_path| and
@@ -72,7 +72,7 @@ class NET_EXPORT UnixDomainServerSocket : public ServerSocket {
// A callback to wrap the setting of the out-parameter to Accept().
// This allows the internal machinery of that call to be implemented in
// a manner that's agnostic to the caller's desired output.
- typedef base::Callback<void(scoped_ptr<SocketPosix>)> SetterCallback;
+ typedef base::Callback<void(std::unique_ptr<SocketPosix>)> SetterCallback;
int DoAccept(const SetterCallback& setter_callback,
const CompletionCallback& callback);
@@ -81,11 +81,11 @@ class NET_EXPORT UnixDomainServerSocket : public ServerSocket {
int rv);
bool AuthenticateAndGetStreamSocket(const SetterCallback& setter_callback);
- scoped_ptr<SocketPosix> listen_socket_;
+ std::unique_ptr<SocketPosix> listen_socket_;
const AuthCallback auth_callback_;
const bool use_abstract_namespace_;
- scoped_ptr<SocketPosix> accept_socket_;
+ std::unique_ptr<SocketPosix> accept_socket_;
DISALLOW_COPY_AND_ASSIGN(UnixDomainServerSocket);
};
« no previous file with comments | « net/socket/unix_domain_client_socket_posix_unittest.cc ('k') | net/socket/unix_domain_server_socket_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698