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

Unified Diff: remoting/host/pam_authorization_factory_posix.cc

Issue 1549493004: Use std::move() instead of .Pass() in remoting/host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass
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/host/pam_authorization_factory_posix.cc
diff --git a/remoting/host/pam_authorization_factory_posix.cc b/remoting/host/pam_authorization_factory_posix.cc
index 7de2141fe2d50ab1cee1db275c3ad7b844e75e6e..10f8fac1078d183b0a1fd21f79cedc7e423dc2bc 100644
--- a/remoting/host/pam_authorization_factory_posix.cc
+++ b/remoting/host/pam_authorization_factory_posix.cc
@@ -46,15 +46,13 @@ class PamAuthorizer : public protocol::Authenticator {
scoped_ptr<protocol::Authenticator> underlying_;
enum { NOT_CHECKED, ALLOWED, DISALLOWED } local_login_status_;
};
+
} // namespace
PamAuthorizer::PamAuthorizer(scoped_ptr<protocol::Authenticator> underlying)
- : underlying_(underlying.Pass()),
- local_login_status_(NOT_CHECKED) {
-}
+ : underlying_(std::move(underlying)), local_login_status_(NOT_CHECKED) {}
-PamAuthorizer::~PamAuthorizer() {
-}
+PamAuthorizer::~PamAuthorizer() {}
protocol::Authenticator::State PamAuthorizer::state() const {
if (local_login_status_ == DISALLOWED) {
@@ -93,7 +91,7 @@ void PamAuthorizer::OnMessageProcessed(const base::Closure& resume_callback) {
scoped_ptr<buzz::XmlElement> PamAuthorizer::GetNextMessage() {
scoped_ptr<buzz::XmlElement> result(underlying_->GetNextMessage());
MaybeCheckLocalLogin();
- return result.Pass();
+ return result;
}
const std::string& PamAuthorizer::GetAuthKey() const {
@@ -160,14 +158,11 @@ int PamAuthorizer::PamConversation(int num_messages,
return PAM_SUCCESS;
}
-
PamAuthorizationFactory::PamAuthorizationFactory(
scoped_ptr<protocol::AuthenticatorFactory> underlying)
- : underlying_(underlying.Pass()) {
-}
+ : underlying_(std::move(underlying)) {}
-PamAuthorizationFactory::~PamAuthorizationFactory() {
-}
+PamAuthorizationFactory::~PamAuthorizationFactory() {}
scoped_ptr<protocol::Authenticator>
PamAuthorizationFactory::CreateAuthenticator(
@@ -176,8 +171,7 @@ PamAuthorizationFactory::CreateAuthenticator(
const buzz::XmlElement* first_message) {
scoped_ptr<protocol::Authenticator> authenticator(
underlying_->CreateAuthenticator(local_jid, remote_jid, first_message));
- return make_scoped_ptr(new PamAuthorizer(authenticator.Pass()));
+ return make_scoped_ptr(new PamAuthorizer(std::move(authenticator)));
}
-
} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698