Index: remoting/host/native_messaging/pipe_messaging_channel.cc |
diff --git a/remoting/host/native_messaging/pipe_messaging_channel.cc b/remoting/host/native_messaging/pipe_messaging_channel.cc |
index becd71014efabca618ff6561deac1b9af1a6167d..633998e58b43c7af6505565b99beb93b592d1d88 100644 |
--- a/remoting/host/native_messaging/pipe_messaging_channel.cc |
+++ b/remoting/host/native_messaging/pipe_messaging_channel.cc |
@@ -43,12 +43,10 @@ base::File DuplicatePlatformFile(base::File file) { |
namespace remoting { |
-PipeMessagingChannel::PipeMessagingChannel( |
- base::File input, |
- base::File output) |
- : native_messaging_reader_(DuplicatePlatformFile(input.Pass())), |
- native_messaging_writer_(new NativeMessagingWriter( |
- DuplicatePlatformFile(output.Pass()))), |
+PipeMessagingChannel::PipeMessagingChannel(base::File input, base::File output) |
+ : native_messaging_reader_(DuplicatePlatformFile(std::move(input))), |
+ native_messaging_writer_( |
+ new NativeMessagingWriter(DuplicatePlatformFile(std::move(output)))), |
event_handler_(nullptr), |
weak_factory_(this) { |
weak_ptr_ = weak_factory_.GetWeakPtr(); |
@@ -73,11 +71,10 @@ void PipeMessagingChannel::ProcessMessage(scoped_ptr<base::Value> message) { |
DCHECK(CalledOnValidThread()); |
if (event_handler_) |
- event_handler_->OnMessage(message.Pass()); |
+ event_handler_->OnMessage(std::move(message)); |
} |
-void PipeMessagingChannel::SendMessage( |
- scoped_ptr<base::Value> message) { |
+void PipeMessagingChannel::SendMessage(scoped_ptr<base::Value> message) { |
DCHECK(CalledOnValidThread()); |
bool success = message && native_messaging_writer_; |