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

Unified Diff: remoting/host/gnubby_socket.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/gnubby_auth_handler_posix.cc ('k') | remoting/host/heartbeat_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/gnubby_socket.cc
diff --git a/remoting/host/gnubby_socket.cc b/remoting/host/gnubby_socket.cc
index 21dad8152f25e479d8919b49775618adeb8c3226..82fe34acbf15e76dbe8420f2ec5255f0bb70f044 100644
--- a/remoting/host/gnubby_socket.cc
+++ b/remoting/host/gnubby_socket.cc
@@ -4,6 +4,8 @@
#include "remoting/host/gnubby_socket.h"
+#include <utility>
+
#include "base/callback_helpers.h"
#include "base/macros.h"
#include "base/timer/timer.h"
@@ -27,7 +29,7 @@ const char kSshError[] = {0x05};
GnubbySocket::GnubbySocket(scoped_ptr<net::StreamSocket> socket,
const base::TimeDelta& timeout,
const base::Closure& timeout_callback)
- : socket_(socket.Pass()),
+ : socket_(std::move(socket)),
read_completed_(false),
read_buffer_(new net::IOBufferWithSize(kRequestReadBufferLength)) {
timer_.reset(new base::Timer(false, false));
@@ -60,7 +62,7 @@ void GnubbySocket::SendResponse(const std::string& response_data) {
scoped_ptr<std::string> response(
new std::string(response_length_string + response_data));
write_buffer_ = new net::DrainableIOBuffer(
- new net::StringIOBuffer(response.Pass()), response_len);
+ new net::StringIOBuffer(std::move(response)), response_len);
DoWrite();
}
« no previous file with comments | « remoting/host/gnubby_auth_handler_posix.cc ('k') | remoting/host/heartbeat_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698