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

Unified Diff: net/socket/socks_client_socket_pool.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/socks_client_socket.cc ('k') | net/socket/socks_client_socket_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socks_client_socket_pool.cc
diff --git a/net/socket/socks_client_socket_pool.cc b/net/socket/socks_client_socket_pool.cc
index dda4aec060fe8e268fe50d88cd32d94128531160..543c2c4ad72103612348315af0255806c1c88697 100644
--- a/net/socket/socks_client_socket_pool.cc
+++ b/net/socket/socks_client_socket_pool.cc
@@ -4,6 +4,8 @@
#include "net/socket/socks_client_socket_pool.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/time/time.h"
@@ -141,13 +143,12 @@ int SOCKSConnectJob::DoSOCKSConnect() {
// Add a SOCKS connection on top of the tcp socket.
if (socks_params_->is_socks_v5()) {
- socket_.reset(new SOCKS5ClientSocket(transport_socket_handle_.Pass(),
+ socket_.reset(new SOCKS5ClientSocket(std::move(transport_socket_handle_),
socks_params_->destination()));
} else {
- socket_.reset(new SOCKSClientSocket(transport_socket_handle_.Pass(),
+ socket_.reset(new SOCKSClientSocket(std::move(transport_socket_handle_),
socks_params_->destination(),
- priority(),
- resolver_));
+ priority(), resolver_));
}
return socket_->Connect(
base::Bind(&SOCKSConnectJob::OnIOComplete, base::Unretained(this)));
@@ -159,7 +160,7 @@ int SOCKSConnectJob::DoSOCKSConnectComplete(int result) {
return result;
}
- SetSocket(socket_.Pass());
+ SetSocket(std::move(socket_));
return result;
}
@@ -241,7 +242,7 @@ void SOCKSClientSocketPool::CancelRequest(const std::string& group_name,
void SOCKSClientSocketPool::ReleaseSocket(const std::string& group_name,
scoped_ptr<StreamSocket> socket,
int id) {
- base_.ReleaseSocket(group_name, socket.Pass(), id);
+ base_.ReleaseSocket(group_name, std::move(socket), id);
}
void SOCKSClientSocketPool::FlushWithError(int error) {
@@ -276,9 +277,9 @@ scoped_ptr<base::DictionaryValue> SOCKSClientSocketPool::GetInfoAsValue(
list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool",
"transport_socket_pool",
false));
- dict->Set("nested_pools", list.Pass());
+ dict->Set("nested_pools", std::move(list));
}
- return dict.Pass();
+ return dict;
}
base::TimeDelta SOCKSClientSocketPool::ConnectionTimeout() const {
« no previous file with comments | « net/socket/socks_client_socket.cc ('k') | net/socket/socks_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698