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

Unified Diff: net/socket/tcp_socket_posix.cc

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_posix.h ('k') | net/socket/tcp_socket_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_socket_posix.cc
diff --git a/net/socket/tcp_socket_posix.cc b/net/socket/tcp_socket_posix.cc
index d674463f83f3c8dccfb1577c5db3a4d7093dcc73..10247715cd1c79d42150a0c9948738e4cde51c23 100644
--- a/net/socket/tcp_socket_posix.cc
+++ b/net/socket/tcp_socket_posix.cc
@@ -139,7 +139,7 @@ void CheckSupportAndMaybeEnableTCPFastOpen(bool user_enabled) {
}
TCPSocketPosix::TCPSocketPosix(
- scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher,
+ std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
NetLog* net_log,
const NetLog::Source& source)
: socket_performance_watcher_(std::move(socket_performance_watcher)),
@@ -202,7 +202,7 @@ int TCPSocketPosix::Listen(int backlog) {
return socket_->Listen(backlog);
}
-int TCPSocketPosix::Accept(scoped_ptr<TCPSocketPosix>* tcp_socket,
+int TCPSocketPosix::Accept(std::unique_ptr<TCPSocketPosix>* tcp_socket,
IPEndPoint* address,
const CompletionCallback& callback) {
DCHECK(tcp_socket);
@@ -483,20 +483,21 @@ void TCPSocketPosix::EndLoggingMultipleConnectAttempts(int net_error) {
}
void TCPSocketPosix::SetTickClockForTesting(
- scoped_ptr<base::TickClock> tick_clock) {
+ std::unique_ptr<base::TickClock> tick_clock) {
tick_clock_ = std::move(tick_clock);
}
-void TCPSocketPosix::AcceptCompleted(scoped_ptr<TCPSocketPosix>* tcp_socket,
- IPEndPoint* address,
- const CompletionCallback& callback,
- int rv) {
+void TCPSocketPosix::AcceptCompleted(
+ std::unique_ptr<TCPSocketPosix>* tcp_socket,
+ IPEndPoint* address,
+ const CompletionCallback& callback,
+ int rv) {
DCHECK_NE(ERR_IO_PENDING, rv);
callback.Run(HandleAcceptCompleted(tcp_socket, address, rv));
}
int TCPSocketPosix::HandleAcceptCompleted(
- scoped_ptr<TCPSocketPosix>* tcp_socket,
+ std::unique_ptr<TCPSocketPosix>* tcp_socket,
IPEndPoint* address,
int rv) {
if (rv == OK)
@@ -512,8 +513,9 @@ int TCPSocketPosix::HandleAcceptCompleted(
return rv;
}
-int TCPSocketPosix::BuildTcpSocketPosix(scoped_ptr<TCPSocketPosix>* tcp_socket,
- IPEndPoint* address) {
+int TCPSocketPosix::BuildTcpSocketPosix(
+ std::unique_ptr<TCPSocketPosix>* tcp_socket,
+ IPEndPoint* address) {
DCHECK(accept_socket_);
SockaddrStorage storage;
« no previous file with comments | « net/socket/tcp_socket_posix.h ('k') | net/socket/tcp_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698