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

Unified Diff: mojo/edk/system/raw_channel.cc

Issue 1529303004: Convert Pass()→std::move() in mojo/edk/ (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
« no previous file with comments | « mojo/edk/system/platform_handle_dispatcher_unittest.cc ('k') | mojo/edk/system/raw_channel_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/raw_channel.cc
diff --git a/mojo/edk/system/raw_channel.cc b/mojo/edk/system/raw_channel.cc
index 8888179e0faa26021a22a10668a3addeedde9979..bfccee72ae2df8e8e7f2377b1452d44a4afe1352 100644
--- a/mojo/edk/system/raw_channel.cc
+++ b/mojo/edk/system/raw_channel.cc
@@ -5,8 +5,8 @@
#include "mojo/edk/system/raw_channel.h"
#include <string.h>
-
#include <algorithm>
+#include <utility>
#include "base/bind.h"
#include "base/location.h"
@@ -283,7 +283,7 @@ void RawChannel::Shutdown() {
{
base::AutoLock read_locker(read_lock_);
base::AutoLock locker(write_lock_);
- OnShutdownNoLock(read_buffer_.Pass(), write_buffer_.Pass());
+ OnShutdownNoLock(std::move(read_buffer_), std::move(write_buffer_));
}
if (initialized_) {
@@ -335,7 +335,7 @@ bool RawChannel::WriteMessage(scoped_ptr<MessageInTransit> message) {
return false;
bool queue_was_empty = write_buffer_->message_queue_.IsEmpty();
- EnqueueMessageNoLock(message.Pass());
+ EnqueueMessageNoLock(std::move(message));
if (queue_was_empty && write_ready_)
return SendQueuedMessagesNoLock();
@@ -398,7 +398,7 @@ void RawChannel::SetSerializedData(
scoped_ptr<MessageInTransit> message(new MessageInTransit(
MessageInTransit::Type::RAW_MESSAGE, message_num_bytes,
static_cast<const char*>(serialized_write_buffer) + offset));
- write_buffer_->message_queue_.AddMessage(message.Pass());
+ write_buffer_->message_queue_.AddMessage(std::move(message));
offset += message_num_bytes;
}
}
@@ -526,7 +526,7 @@ void RawChannel::SerializeWriteBuffer(
void RawChannel::EnqueueMessageNoLock(scoped_ptr<MessageInTransit> message) {
write_lock_.AssertAcquired();
- write_buffer_->message_queue_.AddMessage(message.Pass());
+ write_buffer_->message_queue_.AddMessage(std::move(message));
}
bool RawChannel::OnReadMessageForRawChannel(
@@ -660,9 +660,8 @@ void RawChannel::DispatchMessages(bool* did_dispatch_message,
&platform_handle_table);
if (num_platform_handles > 0) {
- platform_handles =
- GetReadPlatformHandles(num_platform_handles,
- platform_handle_table).Pass();
+ platform_handles = GetReadPlatformHandles(num_platform_handles,
+ platform_handle_table);
if (!platform_handles) {
LOG(ERROR) << "Invalid number of platform handles received";
CallOnError(Delegate::ERROR_READ_BAD_MESSAGE);
@@ -677,7 +676,7 @@ void RawChannel::DispatchMessages(bool* did_dispatch_message,
if (delegate_) {
DCHECK(!calling_delegate_);
calling_delegate_ = true;
- delegate_->OnReadMessage(message_view, platform_handles.Pass());
+ delegate_->OnReadMessage(message_view, std::move(platform_handles));
calling_delegate_ = false;
}
}
« no previous file with comments | « mojo/edk/system/platform_handle_dispatcher_unittest.cc ('k') | mojo/edk/system/raw_channel_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698