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

Unified Diff: remoting/signaling/xmpp_signal_strategy.cc

Issue 1545723002: Use std::move() instead of .Pass() in remoting/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass_host
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
Index: remoting/signaling/xmpp_signal_strategy.cc
diff --git a/remoting/signaling/xmpp_signal_strategy.cc b/remoting/signaling/xmpp_signal_strategy.cc
index 7577df761b2738963ac4845817683b5e3c005391..fbc5373dfc9ef2ce93b2f5288c20b702bd75a1fb 100644
--- a/remoting/signaling/xmpp_signal_strategy.cc
+++ b/remoting/signaling/xmpp_signal_strategy.cc
@@ -4,6 +4,7 @@
#include "remoting/signaling/xmpp_signal_strategy.h"
+#include <utility>
#include <vector>
#include "base/bind.h"
@@ -286,7 +287,7 @@ void XmppSignalStrategy::Core::StartTls() {
scoped_ptr<net::ClientSocketHandle> socket_handle(
new net::ClientSocketHandle());
- socket_handle->SetSocket(socket_.Pass());
+ socket_handle->SetSocket(std::move(socket_));
cert_verifier_ = net::CertVerifier::CreateDefault();
transport_security_state_.reset(new net::TransportSecurityState());
@@ -295,7 +296,7 @@ void XmppSignalStrategy::Core::StartTls() {
context.transport_security_state = transport_security_state_.get();
socket_ = socket_factory_->CreateSSLClientSocket(
- socket_handle.Pass(),
+ std::move(socket_handle),
net::HostPortPair(xmpp_server_config_.host, kDefaultHttpsPort),
net::SSLConfig(), context);
@@ -311,7 +312,7 @@ void XmppSignalStrategy::Core::OnHandshakeDone(
DCHECK(thread_checker_.CalledOnValidThread());
jid_ = jid;
- stream_parser_ = parser.Pass();
+ stream_parser_ = std::move(parser);
stream_parser_->SetCallbacks(
base::Bind(&Core::OnStanza, base::Unretained(this)),
base::Bind(&Core::OnParserError, base::Unretained(this)));
@@ -523,7 +524,7 @@ void XmppSignalStrategy::RemoveListener(Listener* listener) {
core_->RemoveListener(listener);
}
bool XmppSignalStrategy::SendStanza(scoped_ptr<buzz::XmlElement> stanza) {
- return core_->SendStanza(stanza.Pass());
+ return core_->SendStanza(std::move(stanza));
}
std::string XmppSignalStrategy::GetNextId() {
« no previous file with comments | « remoting/signaling/xmpp_login_handler_unittest.cc ('k') | remoting/signaling/xmpp_signal_strategy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698