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

Unified Diff: remoting/host/setup/me2me_native_messaging_host_main.cc

Issue 1549493004: Use std::move() instead of .Pass() in remoting/host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass
Patch Set: include <utility> 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: remoting/host/setup/me2me_native_messaging_host_main.cc
diff --git a/remoting/host/setup/me2me_native_messaging_host_main.cc b/remoting/host/setup/me2me_native_messaging_host_main.cc
index bac51981a4d3b9fa7e1ce391f0b909e5589b4e7c..75fd59049825d24f09ec79c451fe83e03770e84e 100644
--- a/remoting/host/setup/me2me_native_messaging_host_main.cc
+++ b/remoting/host/setup/me2me_native_messaging_host_main.cc
@@ -6,6 +6,8 @@
#include <stdint.h>
+#include <utility>
+
#include "base/at_exit.h"
#include "base/command_line.h"
#include "base/files/file.h"
@@ -248,7 +250,7 @@ int StartMe2MeNativeMessagingHost() {
return kInitializationFailed;
pairing_registry =
- new PairingRegistry(io_thread.task_runner(), delegate.Pass());
+ new PairingRegistry(io_thread.task_runner(), std::move(delegate));
#else // defined(OS_WIN)
pairing_registry =
CreatePairingRegistry(io_thread.task_runner());
@@ -256,17 +258,13 @@ int StartMe2MeNativeMessagingHost() {
// Set up the native messaging channel.
scoped_ptr<extensions::NativeMessagingChannel> channel(
- new PipeMessagingChannel(read_file.Pass(), write_file.Pass()));
+ new PipeMessagingChannel(std::move(read_file), std::move(write_file)));
// Create the native messaging host.
- scoped_ptr<Me2MeNativeMessagingHost> host(
- new Me2MeNativeMessagingHost(
- needs_elevation,
- static_cast<intptr_t>(native_view_handle),
- channel.Pass(),
- daemon_controller,
- pairing_registry,
- oauth_client.Pass()));
+ scoped_ptr<Me2MeNativeMessagingHost> host(new Me2MeNativeMessagingHost(
+ needs_elevation, static_cast<intptr_t>(native_view_handle),
+ std::move(channel), daemon_controller, pairing_registry,
+ std::move(oauth_client)));
host->Start(run_loop.QuitClosure());
// Run the loop until channel is alive.
« no previous file with comments | « remoting/host/setup/me2me_native_messaging_host.cc ('k') | remoting/host/setup/me2me_native_messaging_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698