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

Unified Diff: remoting/base/rsa_key_pair.cc

Issue 1545723002: Use std::move() instead of .Pass() in remoting/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass_host
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
« no previous file with comments | « remoting/base/buffered_socket_writer.cc ('k') | remoting/base/typed_buffer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/rsa_key_pair.cc
diff --git a/remoting/base/rsa_key_pair.cc b/remoting/base/rsa_key_pair.cc
index 66688e988db3155e42f90c25c4f8e89e1b1bf85e..98a153b4367dc1d9760314a79800f5dd03f67454 100644
--- a/remoting/base/rsa_key_pair.cc
+++ b/remoting/base/rsa_key_pair.cc
@@ -8,6 +8,7 @@
#include <limits>
#include <string>
+#include <utility>
#include <vector>
#include "base/base64.h"
@@ -21,7 +22,7 @@
namespace remoting {
RsaKeyPair::RsaKeyPair(scoped_ptr<crypto::RSAPrivateKey> key)
- : key_(key.Pass()){
+ : key_(std::move(key)){
DCHECK(key_);
}
@@ -34,7 +35,7 @@ scoped_refptr<RsaKeyPair> RsaKeyPair::Generate() {
LOG(ERROR) << "Cannot generate private key.";
return NULL;
}
- return new RsaKeyPair(key.Pass());
+ return new RsaKeyPair(std::move(key));
}
// static
@@ -54,7 +55,7 @@ scoped_refptr<RsaKeyPair> RsaKeyPair::FromString(
return NULL;
}
- return new RsaKeyPair(key.Pass());
+ return new RsaKeyPair(std::move(key));
}
std::string RsaKeyPair::ToString() const {
« no previous file with comments | « remoting/base/buffered_socket_writer.cc ('k') | remoting/base/typed_buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698