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

Unified Diff: remoting/signaling/iq_sender.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
« no previous file with comments | « remoting/signaling/fake_signal_strategy.cc ('k') | remoting/signaling/iq_sender_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/signaling/iq_sender.cc
diff --git a/remoting/signaling/iq_sender.cc b/remoting/signaling/iq_sender.cc
index 9e5434019cac6500be6685ce9cb6e06c8d6a8844..498fdb5ea8546a7a0418872232420f84a0719d44 100644
--- a/remoting/signaling/iq_sender.cc
+++ b/remoting/signaling/iq_sender.cc
@@ -4,6 +4,8 @@
#include "remoting/signaling/iq_sender.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/location.h"
@@ -30,7 +32,7 @@ scoped_ptr<buzz::XmlElement> IqSender::MakeIqStanza(
if (!addressee.empty())
stanza->AddAttr(buzz::QN_TO, addressee);
stanza->AddElement(iq_body.release());
- return stanza.Pass();
+ return stanza;
}
IqSender::IqSender(SignalStrategy* signal_strategy)
@@ -47,21 +49,21 @@ scoped_ptr<IqRequest> IqSender::SendIq(scoped_ptr<buzz::XmlElement> stanza,
std::string addressee = stanza->Attr(buzz::QN_TO);
std::string id = signal_strategy_->GetNextId();
stanza->AddAttr(buzz::QN_ID, id);
- if (!signal_strategy_->SendStanza(stanza.Pass())) {
+ if (!signal_strategy_->SendStanza(std::move(stanza))) {
return nullptr;
}
DCHECK(requests_.find(id) == requests_.end());
scoped_ptr<IqRequest> request(new IqRequest(this, callback, addressee));
if (!callback.is_null())
requests_[id] = request.get();
- return request.Pass();
+ return request;
}
scoped_ptr<IqRequest> IqSender::SendIq(const std::string& type,
const std::string& addressee,
scoped_ptr<buzz::XmlElement> iq_body,
const ReplyCallback& callback) {
- return SendIq(MakeIqStanza(type, addressee, iq_body.Pass()), callback);
+ return SendIq(MakeIqStanza(type, addressee, std::move(iq_body)), callback);
}
void IqSender::RemoveRequest(IqRequest* request) {
« no previous file with comments | « remoting/signaling/fake_signal_strategy.cc ('k') | remoting/signaling/iq_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698