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

Unified Diff: remoting/protocol/pairing_registry.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/pairing_registry.cc
diff --git a/remoting/protocol/pairing_registry.cc b/remoting/protocol/pairing_registry.cc
index edf085cd090ad331d3465fe135aa366f881cab74..380b7421d1276ca8fb0cb229c690578b782afaa3 100644
--- a/remoting/protocol/pairing_registry.cc
+++ b/remoting/protocol/pairing_registry.cc
@@ -79,7 +79,7 @@ scoped_ptr<base::DictionaryValue> PairingRegistry::Pairing::ToValue() const {
pairing->SetString(kClientIdKey, client_id());
if (!shared_secret().empty())
pairing->SetString(kSharedSecretKey, shared_secret());
- return pairing.Pass();
+ return pairing;
}
bool PairingRegistry::Pairing::operator==(const Pairing& other) const {
@@ -100,7 +100,7 @@ PairingRegistry::PairingRegistry(
scoped_ptr<Delegate> delegate)
: caller_task_runner_(base::ThreadTaskRunnerHandle::Get()),
delegate_task_runner_(delegate_task_runner),
- delegate_(delegate.Pass()) {
+ delegate_(std::move(delegate)) {
DCHECK(delegate_);
}
@@ -247,7 +247,7 @@ void PairingRegistry::InvokeGetPairingCallbackAndScheduleNext(
void PairingRegistry::InvokeGetAllPairingsCallbackAndScheduleNext(
const GetAllPairingsCallback& callback,
scoped_ptr<base::ListValue> pairings) {
- callback.Run(pairings.Pass());
+ callback.Run(std::move(pairings));
pending_requests_.pop();
ServiceNextRequest();
}
@@ -280,7 +280,7 @@ void PairingRegistry::SanitizePairings(const GetAllPairingsCallback& callback,
sanitized_pairings->Append(sanitized_pairing.ToValue().release());
}
- callback.Run(sanitized_pairings.Pass());
+ callback.Run(std::move(sanitized_pairings));
}
void PairingRegistry::ServiceOrQueueRequest(const base::Closure& request) {

Powered by Google App Engine
This is Rietveld 408576698