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

Unified Diff: third_party/mojo/src/mojo/edk/system/remote_producer_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_producer_data_pipe_impl.cc
diff --git a/third_party/mojo/src/mojo/edk/system/remote_producer_data_pipe_impl.cc b/third_party/mojo/src/mojo/edk/system/remote_producer_data_pipe_impl.cc
index ec878e1fd43b3edc13692d8602ca4835c8e66eea..e47d6c13a543ea30a6834a55525b2c66d0b86f1a 100644
--- a/third_party/mojo/src/mojo/edk/system/remote_producer_data_pipe_impl.cc
+++ b/third_party/mojo/src/mojo/edk/system/remote_producer_data_pipe_impl.cc
@@ -5,8 +5,8 @@
#include "third_party/mojo/src/mojo/edk/system/remote_producer_data_pipe_impl.h"
#include <string.h>
-
#include <algorithm>
+#include <utility>
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
@@ -72,7 +72,7 @@ RemoteProducerDataPipeImpl::RemoteProducerDataPipeImpl(
size_t start_index,
size_t current_num_bytes)
: channel_endpoint_(channel_endpoint),
- buffer_(buffer.Pass()),
+ buffer_(std::move(buffer)),
start_index_(start_index),
current_num_bytes_(current_num_bytes) {
DCHECK(buffer_ || !current_num_bytes);
@@ -109,7 +109,7 @@ bool RemoteProducerDataPipeImpl::ProcessMessagesFromIncomingEndpoint(
}
}
- *buffer = new_buffer.Pass();
+ *buffer = std::move(new_buffer);
*buffer_num_bytes = current_num_bytes;
return true;
}
@@ -444,7 +444,7 @@ void RemoteProducerDataPipeImpl::MarkDataAsConsumed(size_t num_bytes) {
MessageInTransit::Type::ENDPOINT_CLIENT,
MessageInTransit::Subtype::ENDPOINT_CLIENT_DATA_PIPE_ACK,
static_cast<uint32_t>(sizeof(ack_data)), &ack_data));
- if (!channel_endpoint_->EnqueueMessage(message.Pass()))
+ if (!channel_endpoint_->EnqueueMessage(std::move(message)))
Disconnect();
}

Powered by Google App Engine
This is Rietveld 408576698