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

Unified Diff: third_party/mojo/src/mojo/edk/system/master_connection_manager.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/master_connection_manager.cc
diff --git a/third_party/mojo/src/mojo/edk/system/master_connection_manager.cc b/third_party/mojo/src/mojo/edk/system/master_connection_manager.cc
index b72e8ee04c96d0dc9366058f01640e18fdefd07f..ced54ec069a1642a24abc562500d93dab69117cc 100644
--- a/third_party/mojo/src/mojo/edk/system/master_connection_manager.cc
+++ b/third_party/mojo/src/mojo/edk/system/master_connection_manager.cc
@@ -4,6 +4,8 @@
#include "third_party/mojo/src/mojo/edk/system/master_connection_manager.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/location.h"
@@ -101,8 +103,7 @@ MasterConnectionManager::Helper::Helper(
: owner_(owner),
process_identifier_(process_identifier),
slave_info_(slave_info),
- raw_channel_(RawChannel::Create(platform_handle.Pass())) {
-}
+ raw_channel_(RawChannel::Create(std::move(platform_handle))) {}
MasterConnectionManager::Helper::~Helper() {
DCHECK(!raw_channel_);
@@ -194,13 +195,13 @@ void MasterConnectionManager::Helper::OnReadMessage(
new embedder::PlatformHandleVector());
platform_handles->push_back(platform_handle.release());
response->SetTransportData(make_scoped_ptr(
- new TransportData(platform_handles.Pass(),
+ new TransportData(std::move(platform_handles),
raw_channel_->GetSerializedPlatformHandleSize())));
} else {
DCHECK(!platform_handle.is_valid());
}
- if (!raw_channel_->WriteMessage(response.Pass())) {
+ if (!raw_channel_->WriteMessage(std::move(response))) {
LOG(ERROR) << "WriteMessage failed";
FatalError(); // WARNING: This destroys us.
return;
@@ -382,7 +383,7 @@ ProcessIdentifier MasterConnectionManager::AddSlaveAndBootstrap(
embedder::ScopedPlatformHandle platform_handle,
const ConnectionIdentifier& connection_id) {
ProcessIdentifier slave_process_identifier =
- AddSlave(slave_info, platform_handle.Pass());
+ AddSlave(slave_info, std::move(platform_handle));
MutexLocker locker(&mutex_);
DCHECK(pending_connects_.find(connection_id) == pending_connects_.end());
@@ -671,7 +672,7 @@ void MasterConnectionManager::AddSlaveOnPrivateThread(
AssertOnPrivateThread();
scoped_ptr<Helper> helper(new Helper(this, slave_process_identifier,
- slave_info, platform_handle.Pass()));
+ slave_info, std::move(platform_handle)));
helper->Init();
DCHECK(helpers_.find(slave_process_identifier) == helpers_.end());

Powered by Google App Engine
This is Rietveld 408576698