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

Unified Diff: net/socket/client_socket_handle.cc

Issue 1545233002: Convert Pass()→std::move() in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/client_socket_factory.cc ('k') | net/socket/client_socket_pool_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/client_socket_handle.cc
diff --git a/net/socket/client_socket_handle.cc b/net/socket/client_socket_handle.cc
index f38187b3f865c74d83262fc988bef37137735d90..b177fb6f3b2fa4486e8901f221db8741e70740d4 100644
--- a/net/socket/client_socket_handle.cc
+++ b/net/socket/client_socket_handle.cc
@@ -4,6 +4,8 @@
#include "net/socket/client_socket_handle.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/compiler_specific.h"
@@ -43,7 +45,7 @@ void ClientSocketHandle::ResetInternal(bool cancel) {
socket_->NetLog().EndEvent(NetLog::TYPE_SOCKET_IN_USE);
// Release the socket back to the ClientSocketPool so it can be
// deleted or reused.
- pool_->ReleaseSocket(group_name_, socket_.Pass(), pool_id_);
+ pool_->ReleaseSocket(group_name_, std::move(socket_), pool_id_);
} else {
// If the handle has been initialized, we should still have a
// socket.
@@ -134,7 +136,7 @@ bool ClientSocketHandle::GetLoadTimingInfo(
}
void ClientSocketHandle::SetSocket(scoped_ptr<StreamSocket> s) {
- socket_ = s.Pass();
+ socket_ = std::move(s);
}
void ClientSocketHandle::OnIOComplete(int result) {
@@ -145,7 +147,7 @@ void ClientSocketHandle::OnIOComplete(int result) {
}
scoped_ptr<StreamSocket> ClientSocketHandle::PassSocket() {
- return socket_.Pass();
+ return std::move(socket_);
}
void ClientSocketHandle::HandleInitCompletion(int result) {
« no previous file with comments | « net/socket/client_socket_factory.cc ('k') | net/socket/client_socket_pool_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698