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

Unified Diff: remoting/host/win/worker_process_launcher_unittest.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
« no previous file with comments | « remoting/host/win/worker_process_launcher.cc ('k') | remoting/host/win/wts_session_process_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/win/worker_process_launcher_unittest.cc
diff --git a/remoting/host/win/worker_process_launcher_unittest.cc b/remoting/host/win/worker_process_launcher_unittest.cc
index 47496be1cbd18d918778676eb7bd8436bb7c5bb1..840c2d547712a5c31cde9696435fded46017da38 100644
--- a/remoting/host/win/worker_process_launcher_unittest.cc
+++ b/remoting/host/win/worker_process_launcher_unittest.cc
@@ -2,8 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "remoting/host/win/worker_process_launcher.h"
+
#include <stdint.h>
+#include <utility>
+
#include "base/bind.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
@@ -19,7 +23,6 @@
#include "remoting/host/host_exit_codes.h"
#include "remoting/host/ipc_util.h"
#include "remoting/host/win/launch_process_with_token.h"
-#include "remoting/host/win/worker_process_launcher.h"
#include "remoting/host/worker_process_ipc_delegate.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gmock_mutant.h"
@@ -316,9 +319,8 @@ void WorkerProcessLauncherTest::CrashWorker() {
}
void WorkerProcessLauncherTest::StartWorker() {
- launcher_.reset(new WorkerProcessLauncher(
- launcher_delegate_.Pass(),
- &server_listener_));
+ launcher_.reset(new WorkerProcessLauncher(std::move(launcher_delegate_),
+ &server_listener_));
launcher_->SetKillProcessTimeoutForTest(base::TimeDelta::FromMilliseconds(0));
}
@@ -371,16 +373,10 @@ void WorkerProcessLauncherTest::DoLaunchProcess() {
task_runner_);
HANDLE temp_handle;
- ASSERT_TRUE(DuplicateHandle(GetCurrentProcess(),
- worker_process_.Get(),
- GetCurrentProcess(),
- &temp_handle,
- 0,
- FALSE,
+ ASSERT_TRUE(DuplicateHandle(GetCurrentProcess(), worker_process_.Get(),
+ GetCurrentProcess(), &temp_handle, 0, FALSE,
DUPLICATE_SAME_ACCESS));
- ScopedHandle copy(temp_handle);
-
- event_handler_->OnProcessLaunched(copy.Pass());
+ event_handler_->OnProcessLaunched(ScopedHandle(temp_handle));
}
TEST_F(WorkerProcessLauncherTest, Start) {
« no previous file with comments | « remoting/host/win/worker_process_launcher.cc ('k') | remoting/host/win/wts_session_process_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698