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

Unified Diff: mojo/edk/system/core.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/child_broker_host.cc ('k') | mojo/edk/system/data_pipe_consumer_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/core.cc
diff --git a/mojo/edk/system/core.cc b/mojo/edk/system/core.cc
index 77f5b3e243f41ef67d176b869d3db9ec05617f36..b8c990f15df8982620f54a9e7e37e3ad23a23700 100644
--- a/mojo/edk/system/core.cc
+++ b/mojo/edk/system/core.cc
@@ -4,6 +4,7 @@
#include "mojo/edk/system/core.h"
+#include <utility>
#include <vector>
#include "base/containers/stack_container.h"
@@ -293,10 +294,10 @@ MojoResult Core::CreateMessagePipe(
server_handle = channel_pair.PassServerHandle();
client_handle = channel_pair.PassClientHandle();
#endif
- dispatcher0->Init(server_handle.Pass(), nullptr, 0u, nullptr, 0u, nullptr,
- nullptr);
- dispatcher1->Init(client_handle.Pass(), nullptr, 0u, nullptr, 0u, nullptr,
- nullptr);
+ dispatcher0->Init(std::move(server_handle), nullptr, 0u, nullptr, 0u,
+ nullptr, nullptr);
+ dispatcher1->Init(std::move(client_handle), nullptr, 0u, nullptr, 0u,
+ nullptr, nullptr);
} else {
uint64_t pipe_id = 0;
// route_id 0 is used internally in RoutedRawChannel. See kInternalRouteId
@@ -471,8 +472,8 @@ MojoResult Core::CreateDataPipe(
server_handle = channel_pair.PassServerHandle();
client_handle = channel_pair.PassClientHandle();
#endif
- producer_dispatcher->Init(server_handle.Pass(), nullptr, 0u);
- consumer_dispatcher->Init(client_handle.Pass(), nullptr, 0u);
+ producer_dispatcher->Init(std::move(server_handle), nullptr, 0u);
+ consumer_dispatcher->Init(std::move(client_handle), nullptr, 0u);
*data_pipe_producer_handle = handle_pair.first;
*data_pipe_consumer_handle = handle_pair.second;
@@ -618,7 +619,7 @@ MojoResult Core::MapBuffer(MojoHandle buffer_handle,
void* address = mapping->GetBase();
{
base::AutoLock locker(mapping_table_lock_);
- result = mapping_table_.AddMapping(mapping.Pass());
+ result = mapping_table_.AddMapping(std::move(mapping));
}
if (result != MOJO_RESULT_OK)
return result;
« no previous file with comments | « mojo/edk/system/child_broker_host.cc ('k') | mojo/edk/system/data_pipe_consumer_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698