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

Unified Diff: third_party/mojo/src/mojo/edk/system/channel_endpoint.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/channel_endpoint.cc
diff --git a/third_party/mojo/src/mojo/edk/system/channel_endpoint.cc b/third_party/mojo/src/mojo/edk/system/channel_endpoint.cc
index e330b38e39b2d8355786f53757b17f56a0c20bce..78504216ec8bef134178ae0667bd5931546bc3de 100644
--- a/third_party/mojo/src/mojo/edk/system/channel_endpoint.cc
+++ b/third_party/mojo/src/mojo/edk/system/channel_endpoint.cc
@@ -4,6 +4,8 @@
#include "third_party/mojo/src/mojo/edk/system/channel_endpoint.h"
+#include <utility>
+
#include "base/logging.h"
#include "base/threading/platform_thread.h"
#include "mojo/public/cpp/system/macros.h"
@@ -33,10 +35,10 @@ bool ChannelEndpoint::EnqueueMessage(scoped_ptr<MessageInTransit> message) {
switch (state_) {
case State::PAUSED:
- channel_message_queue_.AddMessage(message.Pass());
+ channel_message_queue_.AddMessage(std::move(message));
return true;
case State::RUNNING:
- return WriteMessageNoLock(message.Pass());
+ return WriteMessageNoLock(std::move(message));
case State::DEAD:
return false;
}
@@ -98,7 +100,7 @@ void ChannelEndpoint::AttachAndRun(Channel* channel,
void ChannelEndpoint::OnReadMessage(scoped_ptr<MessageInTransit> message) {
if (message->type() == MessageInTransit::Type::ENDPOINT_CLIENT) {
- OnReadMessageForClient(message.Pass());
+ OnReadMessageForClient(std::move(message));
return;
}
@@ -160,7 +162,7 @@ bool ChannelEndpoint::WriteMessageNoLock(scoped_ptr<MessageInTransit> message) {
message->SerializeAndCloseDispatchers(channel_);
message->set_source_id(local_id_);
message->set_destination_id(remote_id_);
- return channel_->WriteMessage(message.Pass());
+ return channel_->WriteMessage(std::move(message));
}
void ChannelEndpoint::OnReadMessageForClient(
« no previous file with comments | « third_party/mojo/src/mojo/edk/system/channel.cc ('k') | third_party/mojo/src/mojo/edk/system/channel_endpoint_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698