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

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: include <utility> 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/host/pairing_registry_delegate_win.cc ('k') | remoting/host/policy_watcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c0352aa8a102ec1befb001c77dce7a68d4520f67 100644
--- a/remoting/host/pam_authorization_factory_posix.cc
+++ b/remoting/host/pam_authorization_factory_posix.cc
@@ -6,6 +6,8 @@
#include <security/pam_appl.h>
+#include <utility>
+
#include "base/bind.h"
#include "base/callback.h"
#include "base/environment.h"
@@ -46,15 +48,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 +93,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 +160,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 +173,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
« no previous file with comments | « remoting/host/pairing_registry_delegate_win.cc ('k') | remoting/host/policy_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698