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

Unified Diff: remoting/host/native_messaging/native_messaging_pipe.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
Index: remoting/host/native_messaging/native_messaging_pipe.cc
diff --git a/remoting/host/native_messaging/native_messaging_pipe.cc b/remoting/host/native_messaging/native_messaging_pipe.cc
index 58fc53245608aa71530bc9e28215e9144d18b286..d19dde5de008ad4fa5253482a6321b61cd30697a 100644
--- a/remoting/host/native_messaging/native_messaging_pipe.cc
+++ b/remoting/host/native_messaging/native_messaging_pipe.cc
@@ -4,6 +4,8 @@
#include "remoting/host/native_messaging/native_messaging_pipe.h"
+#include <utility>
+
#include "base/callback_helpers.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
@@ -11,17 +13,14 @@
namespace remoting {
-NativeMessagingPipe::NativeMessagingPipe() {
-}
-
-NativeMessagingPipe::~NativeMessagingPipe() {
-}
+NativeMessagingPipe::NativeMessagingPipe() {}
+NativeMessagingPipe::~NativeMessagingPipe() {}
void NativeMessagingPipe::Start(
scoped_ptr<extensions::NativeMessageHost> host,
scoped_ptr<extensions::NativeMessagingChannel> channel) {
- host_ = host.Pass();
- channel_ = channel.Pass();
+ host_ = std::move(host);
+ channel_ = std::move(channel);
channel_->Start(this);
}
@@ -39,7 +38,7 @@ void NativeMessagingPipe::OnDisconnect() {
void NativeMessagingPipe::PostMessageFromNativeHost(
const std::string& message) {
scoped_ptr<base::Value> json = base::JSONReader::Read(message);
- channel_->SendMessage(json.Pass());
+ channel_->SendMessage(std::move(json));
}
void NativeMessagingPipe::CloseChannel(const std::string& error_message) {
« no previous file with comments | « remoting/host/native_messaging/log_message_handler.cc ('k') | remoting/host/native_messaging/native_messaging_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698