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

Unified Diff: net/socket/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/socket_posix.h ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socket_posix.cc
diff --git a/net/socket/socket_posix.cc b/net/socket/socket_posix.cc
index ca8b04f09a4741282f7d441711d87ba315332ce3..19d4343fa4277b53c39bfd0976d98bd5ed04c2fe 100644
--- a/net/socket/socket_posix.cc
+++ b/net/socket/socket_posix.cc
@@ -142,7 +142,7 @@ int SocketPosix::Listen(int backlog) {
return OK;
}
-int SocketPosix::Accept(scoped_ptr<SocketPosix>* socket,
+int SocketPosix::Accept(std::unique_ptr<SocketPosix>* socket,
const CompletionCallback& callback) {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK_NE(kInvalidSocket, socket_fd_);
@@ -367,7 +367,7 @@ void SocketPosix::OnFileCanWriteWithoutBlocking(int fd) {
}
}
-int SocketPosix::DoAccept(scoped_ptr<SocketPosix>* socket) {
+int SocketPosix::DoAccept(std::unique_ptr<SocketPosix>* socket) {
SockaddrStorage new_peer_address;
int new_socket = HANDLE_EINTR(accept(socket_fd_,
new_peer_address.addr,
@@ -375,7 +375,7 @@ int SocketPosix::DoAccept(scoped_ptr<SocketPosix>* socket) {
if (new_socket < 0)
return MapAcceptError(errno);
- scoped_ptr<SocketPosix> accepted_socket(new SocketPosix);
+ std::unique_ptr<SocketPosix> accepted_socket(new SocketPosix);
int rv = accepted_socket->AdoptConnectedSocket(new_socket, new_peer_address);
if (rv != OK)
return rv;
« no previous file with comments | « net/socket/socket_posix.h ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698