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

Unified Diff: third_party/mojo/src/mojo/edk/system/remote_consumer_data_pipe_impl.cc

Issue 1545333002: Convert Pass()→std::move() in //third_party/mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
Index: third_party/mojo/src/mojo/edk/system/remote_consumer_data_pipe_impl.cc
diff --git a/third_party/mojo/src/mojo/edk/system/remote_consumer_data_pipe_impl.cc b/third_party/mojo/src/mojo/edk/system/remote_consumer_data_pipe_impl.cc
index ba2a96171d5ed8f6be5710f5c2ce11aa1b94775d..8cb48db1cfb9ddf794c38dbc1d8eab6bba0ac5bb 100644
--- a/third_party/mojo/src/mojo/edk/system/remote_consumer_data_pipe_impl.cc
+++ b/third_party/mojo/src/mojo/edk/system/remote_consumer_data_pipe_impl.cc
@@ -5,8 +5,8 @@
#include "third_party/mojo/src/mojo/edk/system/remote_consumer_data_pipe_impl.h"
#include <string.h>
-
#include <algorithm>
+#include <utility>
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
@@ -73,7 +73,7 @@ RemoteConsumerDataPipeImpl::RemoteConsumerDataPipeImpl(
size_t start_index)
: channel_endpoint_(channel_endpoint),
consumer_num_bytes_(consumer_num_bytes),
- buffer_(buffer.Pass()),
+ buffer_(std::move(buffer)),
start_index_(start_index) {
// Note: |buffer_| may be null (in which case it'll be lazily allocated).
}
@@ -156,7 +156,7 @@ MojoResult RemoteConsumerDataPipeImpl::ProducerWriteData(
MessageInTransit::Type::ENDPOINT_CLIENT,
MessageInTransit::Subtype::ENDPOINT_CLIENT_DATA,
static_cast<uint32_t>(message_num_bytes), elements.At(offset)));
- if (!channel_endpoint_->EnqueueMessage(message.Pass())) {
+ if (!channel_endpoint_->EnqueueMessage(std::move(message))) {
Disconnect();
break;
}
@@ -230,7 +230,7 @@ MojoResult RemoteConsumerDataPipeImpl::ProducerEndWriteData(
MessageInTransit::Subtype::ENDPOINT_CLIENT_DATA,
static_cast<uint32_t>(message_num_bytes),
buffer_.get() + start_index_ + offset));
- if (!channel_endpoint_->EnqueueMessage(message.Pass())) {
+ if (!channel_endpoint_->EnqueueMessage(std::move(message))) {
set_producer_two_phase_max_num_bytes_written(0);
Disconnect();
return MOJO_RESULT_OK;

Powered by Google App Engine
This is Rietveld 408576698