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

Unified Diff: net/socket/tcp_server_socket.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
« no previous file with comments | « net/socket/tcp_client_socket_unittest.cc ('k') | net/socket/tcp_server_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_server_socket.h
diff --git a/net/socket/tcp_server_socket.h b/net/socket/tcp_server_socket.h
index 7611ff911b956fe3315ceca7f03ade0c84981750..993d4bafdc7573ab3c22e2ee096a3d1971bb408e 100644
--- a/net/socket/tcp_server_socket.h
+++ b/net/socket/tcp_server_socket.h
@@ -5,8 +5,9 @@
#ifndef NET_SOCKET_TCP_SERVER_SOCKET_H_
#define NET_SOCKET_TCP_SERVER_SOCKET_H_
+#include <memory>
+
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "net/base/ip_endpoint.h"
#include "net/base/net_export.h"
#include "net/log/net_log.h"
@@ -23,7 +24,7 @@ class NET_EXPORT TCPServerSocket : public ServerSocket {
// net::ServerSocket implementation.
int Listen(const IPEndPoint& address, 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;
// Detachs from the current thread, to allow the socket to be transferred to
@@ -36,16 +37,17 @@ class NET_EXPORT TCPServerSocket : public ServerSocket {
// |output_accepted_socket|.
// |output_accepted_socket| is untouched on failure. But |accepted_socket_| is
// set to NULL in any case.
- int ConvertAcceptedSocket(int result,
- scoped_ptr<StreamSocket>* output_accepted_socket);
+ int ConvertAcceptedSocket(
+ int result,
+ std::unique_ptr<StreamSocket>* output_accepted_socket);
// Completion callback for calling TCPSocket::Accept().
- void OnAcceptCompleted(scoped_ptr<StreamSocket>* output_accepted_socket,
+ void OnAcceptCompleted(std::unique_ptr<StreamSocket>* output_accepted_socket,
const CompletionCallback& forward_callback,
int result);
TCPSocket socket_;
- scoped_ptr<TCPSocket> accepted_socket_;
+ std::unique_ptr<TCPSocket> accepted_socket_;
IPEndPoint accepted_address_;
bool pending_accept_;
« no previous file with comments | « net/socket/tcp_client_socket_unittest.cc ('k') | net/socket/tcp_server_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698