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

Unified Diff: net/socket/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
« no previous file with comments | « net/socket/socket_net_log_params.cc ('k') | net/socket/socket_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socket_posix.h
diff --git a/net/socket/socket_posix.h b/net/socket/socket_posix.h
index f6df5292bf60ce4ccba1e7830c8656586eaccf30..956552abb89cb4eaab096efe55bafacd72caa645 100644
--- a/net/socket/socket_posix.h
+++ b/net/socket/socket_posix.h
@@ -5,10 +5,11 @@
#ifndef NET_SOCKET_SOCKET_POSIX_H_
#define NET_SOCKET_SOCKET_POSIX_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/message_loop/message_loop.h"
#include "base/threading/thread_checker.h"
#include "net/base/completion_callback.h"
@@ -39,7 +40,7 @@ class NET_EXPORT_PRIVATE SocketPosix : public base::MessageLoopForIO::Watcher {
int Bind(const SockaddrStorage& address);
int Listen(int backlog);
- int Accept(scoped_ptr<SocketPosix>* socket,
+ int Accept(std::unique_ptr<SocketPosix>* socket,
const CompletionCallback& callback);
// Connects socket. On non-ERR_IO_PENDING error, sets errno and returns a net
@@ -87,7 +88,7 @@ class NET_EXPORT_PRIVATE SocketPosix : public base::MessageLoopForIO::Watcher {
void OnFileCanReadWithoutBlocking(int fd) override;
void OnFileCanWriteWithoutBlocking(int fd) override;
- int DoAccept(scoped_ptr<SocketPosix>* socket);
+ int DoAccept(std::unique_ptr<SocketPosix>* socket);
void AcceptCompleted();
int DoConnect();
@@ -104,7 +105,7 @@ class NET_EXPORT_PRIVATE SocketPosix : public base::MessageLoopForIO::Watcher {
SocketDescriptor socket_fd_;
base::MessageLoopForIO::FileDescriptorWatcher accept_socket_watcher_;
- scoped_ptr<SocketPosix>* accept_socket_;
+ std::unique_ptr<SocketPosix>* accept_socket_;
CompletionCallback accept_callback_;
base::MessageLoopForIO::FileDescriptorWatcher read_socket_watcher_;
@@ -123,7 +124,7 @@ class NET_EXPORT_PRIVATE SocketPosix : public base::MessageLoopForIO::Watcher {
// called when connect is complete.
bool waiting_connect_;
- scoped_ptr<SockaddrStorage> peer_address_;
+ std::unique_ptr<SockaddrStorage> peer_address_;
base::ThreadChecker thread_checker_;
« no previous file with comments | « net/socket/socket_net_log_params.cc ('k') | net/socket/socket_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698