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

Unified Diff: third_party/mojo/src/mojo/edk/system/channel.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.cc
diff --git a/third_party/mojo/src/mojo/edk/system/channel.cc b/third_party/mojo/src/mojo/edk/system/channel.cc
index 0b3e9f85d27f6dca01e17d1989e1308abbb3723d..d50da13aad159540af6180458b90b196186337e1 100644
--- a/third_party/mojo/src/mojo/edk/system/channel.cc
+++ b/third_party/mojo/src/mojo/edk/system/channel.cc
@@ -43,7 +43,7 @@ void Channel::Init(scoped_ptr<RawChannel> raw_channel) {
// No need to take |mutex_|, since this must be called before this object
// becomes thread-safe.
DCHECK(!is_running_);
- raw_channel_ = raw_channel.Pass();
+ raw_channel_ = std::move(raw_channel);
raw_channel_->Init(this);
is_running_ = true;
}
@@ -162,7 +162,7 @@ bool Channel::WriteMessage(scoped_ptr<MessageInTransit> message) {
}
DVLOG_IF(2, is_shutting_down_) << "WriteMessage() while shutting down";
- return raw_channel_->WriteMessage(message.Pass());
+ return raw_channel_->WriteMessage(std::move(message));
}
bool Channel::IsWriteBufferEmpty() {
@@ -316,10 +316,10 @@ void Channel::OnReadMessage(
switch (message_view.type()) {
case MessageInTransit::Type::ENDPOINT_CLIENT:
case MessageInTransit::Type::ENDPOINT:
- OnReadMessageForEndpoint(message_view, platform_handles.Pass());
+ OnReadMessageForEndpoint(message_view, std::move(platform_handles));
break;
case MessageInTransit::Type::CHANNEL:
- OnReadMessageForChannel(message_view, platform_handles.Pass());
+ OnReadMessageForChannel(message_view, std::move(platform_handles));
break;
default:
HandleRemoteError(
@@ -416,11 +416,11 @@ void Channel::OnReadMessageForEndpoint(
DCHECK(message_view.transport_data_buffer());
message->SetDispatchers(TransportData::DeserializeDispatchers(
message_view.transport_data_buffer(),
- message_view.transport_data_buffer_size(), platform_handles.Pass(),
+ message_view.transport_data_buffer_size(), std::move(platform_handles),
this));
}
- endpoint->OnReadMessage(message.Pass());
+ endpoint->OnReadMessage(std::move(message));
}
void Channel::OnReadMessageForChannel(
@@ -668,7 +668,7 @@ bool Channel::SendControlMessage(MessageInTransit::Subtype subtype,
MessageInTransit::Type::CHANNEL, subtype, 0, nullptr));
message->set_source_id(local_id);
message->set_destination_id(remote_id);
- return WriteMessage(message.Pass());
+ return WriteMessage(std::move(message));
}
} // namespace system
« no previous file with comments | « third_party/mojo/src/mojo/edk/js/tests/js_to_cpp_tests.cc ('k') | third_party/mojo/src/mojo/edk/system/channel_endpoint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698