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

Unified Diff: mojo/edk/system/data_pipe_consumer_dispatcher.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/core.cc ('k') | mojo/edk/system/data_pipe_producer_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/data_pipe_consumer_dispatcher.cc
diff --git a/mojo/edk/system/data_pipe_consumer_dispatcher.cc b/mojo/edk/system/data_pipe_consumer_dispatcher.cc
index 6f86663be988c1964ad5c18fb5593d676eb389e4..386c4e985af188c64b9c480f745b3c5b957ff9a4 100644
--- a/mojo/edk/system/data_pipe_consumer_dispatcher.cc
+++ b/mojo/edk/system/data_pipe_consumer_dispatcher.cc
@@ -5,6 +5,7 @@
#include "mojo/edk/system/data_pipe_consumer_dispatcher.h"
#include <algorithm>
+#include <utility>
#include "base/bind.h"
#include "base/logging.h"
@@ -26,7 +27,7 @@ void DataPipeConsumerDispatcher::Init(
ScopedPlatformHandle message_pipe,
char* serialized_read_buffer, size_t serialized_read_buffer_size) {
if (message_pipe.is_valid()) {
- channel_ = RawChannel::Create(message_pipe.Pass());
+ channel_ = RawChannel::Create(std::move(message_pipe));
channel_->SetSerializedData(
serialized_read_buffer, serialized_read_buffer_size, nullptr, 0u,
nullptr, nullptr);
@@ -82,7 +83,7 @@ DataPipeConsumerDispatcher::Deserialize(
scoped_ptr<PlatformSharedBufferMapping> mapping;
if (shared_memory_size) {
shared_buffer = internal::g_platform_support->CreateSharedBufferFromHandle(
- shared_memory_size, shared_memory_handle.Pass());
+ shared_memory_size, std::move(shared_memory_handle));
mapping = shared_buffer->Map(0, shared_memory_size);
char* buffer = static_cast<char*>(mapping->GetBase());
SharedMemoryHeader* header = reinterpret_cast<SharedMemoryHeader*>(buffer);
@@ -99,7 +100,7 @@ DataPipeConsumerDispatcher::Deserialize(
}
}
- rv->Init(platform_handle.Pass(), serialized_read_buffer,
+ rv->Init(std::move(platform_handle), serialized_read_buffer,
serialized_read_buffer_size);
return rv;
}
@@ -143,7 +144,7 @@ DataPipeConsumerDispatcher::CreateEquivalentDispatcherAndCloseImplNoLock() {
scoped_refptr<DataPipeConsumerDispatcher> rv = Create(options_);
data_.swap(rv->data_);
serialized_read_buffer_.swap(rv->serialized_read_buffer_);
- rv->serialized_platform_handle_ = serialized_platform_handle_.Pass();
+ rv->serialized_platform_handle_ = std::move(serialized_platform_handle_);
rv->serialized_ = true;
return scoped_refptr<Dispatcher>(rv.get());
@@ -373,11 +374,9 @@ bool DataPipeConsumerDispatcher::EndSerializeAndCloseImplNoLock(
shared_memory_handle.reset(shared_buffer->PassPlatformHandle().release());
}
- DataPipe::EndSerialize(
- options_,
- serialized_platform_handle_.Pass(),
- shared_memory_handle.Pass(), shared_memory_size,
- destination, actual_size, platform_handles);
+ DataPipe::EndSerialize(options_, std::move(serialized_platform_handle_),
+ std::move(shared_memory_handle), shared_memory_size,
+ destination, actual_size, platform_handles);
CloseImplNoLock();
return true;
}
« no previous file with comments | « mojo/edk/system/core.cc ('k') | mojo/edk/system/data_pipe_producer_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698