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

Unified Diff: net/socket/tcp_socket_win.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_socket_unittest.cc ('k') | net/socket/tcp_socket_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_socket_win.h
diff --git a/net/socket/tcp_socket_win.h b/net/socket/tcp_socket_win.h
index 2f3be4610d25ed25ba03ed891f2c0308dfe5793e..4710287cd51c7eec3e7b27ce88c79c5abb68a36e 100644
--- a/net/socket/tcp_socket_win.h
+++ b/net/socket/tcp_socket_win.h
@@ -8,10 +8,11 @@
#include <stdint.h>
#include <winsock2.h>
+#include <memory>
+
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/threading/non_thread_safe.h"
#include "base/win/object_watcher.h"
#include "net/base/address_family.h"
@@ -29,9 +30,10 @@ class IPEndPoint;
class NET_EXPORT TCPSocketWin : NON_EXPORTED_BASE(public base::NonThreadSafe),
public base::win::ObjectWatcher::Delegate {
public:
- TCPSocketWin(scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher,
- NetLog* net_log,
- const NetLog::Source& source);
+ TCPSocketWin(
+ std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
+ NetLog* net_log,
+ const NetLog::Source& source);
~TCPSocketWin() override;
int Open(AddressFamily family);
@@ -46,7 +48,7 @@ class NET_EXPORT TCPSocketWin : NON_EXPORTED_BASE(public base::NonThreadSafe),
int Bind(const IPEndPoint& address);
int Listen(int backlog);
- int Accept(scoped_ptr<TCPSocketWin>* socket,
+ int Accept(std::unique_ptr<TCPSocketWin>* socket,
IPEndPoint* address,
const CompletionCallback& callback);
@@ -115,7 +117,7 @@ class NET_EXPORT TCPSocketWin : NON_EXPORTED_BASE(public base::NonThreadSafe),
// base::ObjectWatcher::Delegate implementation.
void OnObjectSignaled(HANDLE object) override;
- int AcceptInternal(scoped_ptr<TCPSocketWin>* socket,
+ int AcceptInternal(std::unique_ptr<TCPSocketWin>* socket,
IPEndPoint* address);
int DoConnect();
@@ -132,12 +134,12 @@ class NET_EXPORT TCPSocketWin : NON_EXPORTED_BASE(public base::NonThreadSafe),
SOCKET socket_;
// |socket_performance_watcher_| may be nullptr.
- scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher_;
+ std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher_;
HANDLE accept_event_;
base::win::ObjectWatcher accept_watcher_;
- scoped_ptr<TCPSocketWin>* accept_socket_;
+ std::unique_ptr<TCPSocketWin>* accept_socket_;
IPEndPoint* accept_address_;
CompletionCallback accept_callback_;
@@ -157,7 +159,7 @@ class NET_EXPORT TCPSocketWin : NON_EXPORTED_BASE(public base::NonThreadSafe),
// External callback; called when write is complete.
CompletionCallback write_callback_;
- scoped_ptr<IPEndPoint> peer_address_;
+ std::unique_ptr<IPEndPoint> peer_address_;
// The OS error that a connect attempt last completed with.
int connect_os_error_;
« no previous file with comments | « net/socket/tcp_socket_unittest.cc ('k') | net/socket/tcp_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698