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

Unified Diff: third_party/mojo/src/mojo/edk/system/platform_handle_dispatcher.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/platform_handle_dispatcher.cc
diff --git a/third_party/mojo/src/mojo/edk/system/platform_handle_dispatcher.cc b/third_party/mojo/src/mojo/edk/system/platform_handle_dispatcher.cc
index c440ec06761ad8d74c9c6890d62060ccd252cb8c..5e3f639310fa551424fdd14e237c2d44c5fc02c7 100644
--- a/third_party/mojo/src/mojo/edk/system/platform_handle_dispatcher.cc
+++ b/third_party/mojo/src/mojo/edk/system/platform_handle_dispatcher.cc
@@ -5,6 +5,7 @@
#include "third_party/mojo/src/mojo/edk/system/platform_handle_dispatcher.h"
#include <algorithm>
+#include <utility>
#include "base/logging.h"
@@ -23,7 +24,7 @@ struct SerializedPlatformHandleDispatcher {
embedder::ScopedPlatformHandle PlatformHandleDispatcher::PassPlatformHandle() {
MutexLocker locker(&mutex());
- return platform_handle_.Pass();
+ return std::move(platform_handle_);
}
Dispatcher::Type PlatformHandleDispatcher::GetType() const {
@@ -66,8 +67,7 @@ scoped_refptr<PlatformHandleDispatcher> PlatformHandleDispatcher::Deserialize(
PlatformHandleDispatcher::PlatformHandleDispatcher(
embedder::ScopedPlatformHandle platform_handle)
- : platform_handle_(platform_handle.Pass()) {
-}
+ : platform_handle_(std::move(platform_handle)) {}
PlatformHandleDispatcher::~PlatformHandleDispatcher() {
}
@@ -80,7 +80,7 @@ void PlatformHandleDispatcher::CloseImplNoLock() {
scoped_refptr<Dispatcher>
PlatformHandleDispatcher::CreateEquivalentDispatcherAndCloseImplNoLock() {
mutex().AssertHeld();
- return Create(platform_handle_.Pass());
+ return Create(std::move(platform_handle_));
}
void PlatformHandleDispatcher::StartSerializeImplNoLock(

Powered by Google App Engine
This is Rietveld 408576698