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

Unified Diff: remoting/protocol/jingle_session.cc

Issue 1534193004: Use std::move() instead of scoped_ptr<>::Pass(). (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
Index: remoting/protocol/jingle_session.cc
diff --git a/remoting/protocol/jingle_session.cc b/remoting/protocol/jingle_session.cc
index 47eab674b61bd2774009f951a5b9e95fea47f20a..3be22b8acff72764422aa53c5f13ecada32e0803 100644
--- a/remoting/protocol/jingle_session.cc
+++ b/remoting/protocol/jingle_session.cc
@@ -96,7 +96,7 @@ void JingleSession::StartConnection(const std::string& peer_jid,
DCHECK_EQ(authenticator->state(), Authenticator::MESSAGE_READY);
peer_jid_ = peer_jid;
- authenticator_ = authenticator.Pass();
+ authenticator_ = std::move(authenticator);
// Generate random session ID. There are usually not more than 1
// concurrent session per host, so a random 64-bit integer provides
@@ -128,7 +128,7 @@ void JingleSession::InitializeIncomingConnection(
DCHECK_EQ(authenticator->state(), Authenticator::WAITING_MESSAGE);
peer_jid_ = initiate_message.from;
- authenticator_ = authenticator.Pass();
+ authenticator_ = std::move(authenticator);
session_id_ = initiate_message.sid;
SetState(ACCEPTING);
@@ -182,7 +182,7 @@ void JingleSession::ContinueAcceptIncomingConnection() {
auth_message = authenticator_->GetNextMessage();
message.description.reset(new ContentDescription(
- CandidateSessionConfig::CreateFrom(*config_), auth_message.Pass()));
+ CandidateSessionConfig::CreateFrom(*config_), std::move(auth_message)));
SendMessage(message);
// Update state.
@@ -326,7 +326,7 @@ void JingleSession::OnOutgoingTransportInfo(
DCHECK(CalledOnValidThread());
JingleMessage message(peer_jid_, JingleMessage::TRANSPORT_INFO, session_id_);
- message.transport_info = transport_info.Pass();
+ message.transport_info = std::move(transport_info);
scoped_ptr<IqRequest> request = session_manager_->iq_sender()->SendIq(
message.ToXml(), base::Bind(&JingleSession::OnTransportInfoResponse,

Powered by Google App Engine
This is Rietveld 408576698