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

Unified Diff: remoting/protocol/negotiating_host_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_host_authenticator.cc
diff --git a/remoting/protocol/negotiating_host_authenticator.cc b/remoting/protocol/negotiating_host_authenticator.cc
index c4dada44e2fbe36af7f7180a938b8e4935fe6210..77201e011e03059ed3b239ade3341d382986059d 100644
--- a/remoting/protocol/negotiating_host_authenticator.cc
+++ b/remoting/protocol/negotiating_host_authenticator.cc
@@ -45,7 +45,7 @@ scoped_ptr<Authenticator> NegotiatingHostAuthenticator::CreateWithSharedSecret(
if (pairing_registry.get()) {
result->AddMethod(AuthenticationMethod::Spake2Pair());
}
- return result.Pass();
+ return std::move(result);
}
// static
@@ -56,9 +56,9 @@ NegotiatingHostAuthenticator::CreateWithThirdPartyAuth(
scoped_ptr<TokenValidator> token_validator) {
scoped_ptr<NegotiatingHostAuthenticator> result(
new NegotiatingHostAuthenticator(local_cert, key_pair));
- result->token_validator_ = token_validator.Pass();
+ result->token_validator_ = std::move(token_validator);
result->AddMethod(AuthenticationMethod::ThirdParty());
- return result.Pass();
+ return std::move(result);
}
NegotiatingHostAuthenticator::~NegotiatingHostAuthenticator() {
@@ -163,7 +163,7 @@ void NegotiatingHostAuthenticator::CreateAuthenticator(
// one |ThirdPartyHostAuthenticator| will need to be created per session.
DCHECK(token_validator_);
current_authenticator_.reset(new ThirdPartyHostAuthenticator(
- local_cert_, local_key_pair_, token_validator_.Pass()));
+ local_cert_, local_key_pair_, std::move(token_validator_)));
} else if (current_method_ == AuthenticationMethod::Spake2Pair() &&
preferred_initial_state == WAITING_MESSAGE) {
// If the client requested Spake2Pair and sent an initial message, attempt

Powered by Google App Engine
This is Rietveld 408576698