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

Unified Diff: remoting/host/ipc_desktop_environment_unittest.cc

Issue 859413003: Remove uses of CloseProcessHandle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase (revert watcher client changes) Created 5 years, 10 months 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/ipc_desktop_environment.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/ipc_desktop_environment_unittest.cc
diff --git a/remoting/host/ipc_desktop_environment_unittest.cc b/remoting/host/ipc_desktop_environment_unittest.cc
index 9174f67e70e0d993daef44d82771f735f129d40a..515f6263838fe3909bbf3be4811381c4d08f9371 100644
--- a/remoting/host/ipc_desktop_environment_unittest.cc
+++ b/remoting/host/ipc_desktop_environment_unittest.cc
@@ -421,9 +421,16 @@ void IpcDesktopEnvironmentTest::OnDisconnectCallback() {
void IpcDesktopEnvironmentTest::OnDesktopAttached(
IPC::PlatformFileForTransit desktop_pipe) {
+ base::ProcessHandle process_handle = base::GetCurrentProcessHandle();
+#if defined(OS_WIN)
+ ASSERT_NE(FALSE, ::DuplicateHandle(GetCurrentProcess(), process_handle,
+ GetCurrentProcess(), &process_handle,
+ 0, FALSE, DUPLICATE_SAME_ACCESS));
+#endif
+
// Instruct DesktopSessionProxy to connect to the network-to-desktop pipe.
desktop_environment_factory_->OnDesktopSessionAgentAttached(
- terminal_id_, base::GetCurrentProcessHandle(), desktop_pipe);
+ terminal_id_, process_handle, desktop_pipe);
}
// Runs until the desktop is attached and exits immediately after that.
« no previous file with comments | « remoting/host/ipc_desktop_environment.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698