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

Unified Diff: remoting/host/win/worker_process_launcher_unittest.cc

Issue 71013004: Base: Remove Receive() from ScopedHandle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add constructor Created 7 years, 1 month 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/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 3737f8b0d07f124762fceb8eaa82afd86edb94eb..431ffe9a051c01ff5d04d2f4bfec71a6d2c75df0 100644
--- a/remoting/host/win/worker_process_launcher_unittest.cc
+++ b/remoting/host/win/worker_process_launcher_unittest.cc
@@ -343,7 +343,7 @@ void WorkerProcessLauncherTest::DoLaunchProcess() {
STARTUPINFOW startup_info = { 0 };
startup_info.cb = sizeof(startup_info);
- base::win::ScopedProcessInformation process_information;
+ PROCESS_INFORMATION temp_process_info = {};
ASSERT_TRUE(CreateProcess(NULL,
notepad,
NULL, // default process attibutes
@@ -353,7 +353,8 @@ void WorkerProcessLauncherTest::DoLaunchProcess() {
NULL, // no environment
NULL, // default current directory
&startup_info,
- process_information.Receive()));
+ &temp_process_info));
+ base::win::ScopedProcessInformation process_information(temp_process_info);
worker_process_.Set(process_information.TakeProcessHandle());
ASSERT_TRUE(worker_process_.IsValid());
@@ -368,14 +369,16 @@ void WorkerProcessLauncherTest::DoLaunchProcess() {
this,
task_runner_));
- ScopedHandle copy;
+ HANDLE temp_handle;
ASSERT_TRUE(DuplicateHandle(GetCurrentProcess(),
worker_process_,
GetCurrentProcess(),
- copy.Receive(),
+ &temp_handle,
0,
FALSE,
DUPLICATE_SAME_ACCESS));
+ ScopedHandle copy;
+ copy.Set(temp_handle);
event_handler_->OnProcessLaunched(copy.Pass());
}

Powered by Google App Engine
This is Rietveld 408576698