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

Unified Diff: remoting/protocol/negotiating_client_authenticator.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/negotiating_client_authenticator.cc
diff --git a/remoting/protocol/negotiating_client_authenticator.cc b/remoting/protocol/negotiating_client_authenticator.cc
index ce2f410c68eddf88f6cbac8d57bb164e4cd750df..471513915180e7b2ee7f236feab7b59ec129da92 100644
--- a/remoting/protocol/negotiating_client_authenticator.cc
+++ b/remoting/protocol/negotiating_client_authenticator.cc
@@ -31,7 +31,7 @@ NegotiatingClientAuthenticator::NegotiatingClientAuthenticator(
shared_secret_(shared_secret),
authentication_tag_(authentication_tag),
fetch_secret_callback_(fetch_secret_callback),
- token_fetcher_(token_fetcher.Pass()),
+ token_fetcher_(std::move(token_fetcher)),
method_set_by_host_(false),
weak_factory_(this) {
DCHECK(!methods.empty());
@@ -105,7 +105,7 @@ scoped_ptr<buzz::XmlElement> NegotiatingClientAuthenticator::GetNextMessage() {
}
result->AddAttr(kSupportedMethodsAttributeQName, supported_methods.str());
state_ = WAITING_MESSAGE;
- return result.Pass();
+ return result;
}
return GetNextMessageInternal();
}
@@ -120,7 +120,7 @@ void NegotiatingClientAuthenticator::CreateAuthenticatorForCurrentMethod(
// one |ThirdPartyClientAuthenticator| will need to be created per session.
DCHECK(token_fetcher_);
current_authenticator_.reset(new ThirdPartyClientAuthenticator(
- token_fetcher_.Pass()));
+ std::move(token_fetcher_)));
resume_callback.Run();
} else {
DCHECK(current_method_.type() == AuthenticationMethod::SPAKE2 ||

Powered by Google App Engine
This is Rietveld 408576698