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

Side by Side Diff: remoting/host/win/unprivileged_process_delegate.cc

Issue 2738853002: Connections now take a ConnectionParams instead of a pipe handle. (Closed)
Patch Set: Fix Win release build. Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 1
2 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 // 5 //
6 // This file implements the Windows service controlling Me2Me host processes 6 // This file implements the Windows service controlling Me2Me host processes
7 // running within user sessions. 7 // running within user sessions.
8 8
9 #include "remoting/host/win/unprivileged_process_delegate.h" 9 #include "remoting/host/win/unprivileged_process_delegate.h"
10 10
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 ScopedHandle worker_process; 304 ScopedHandle worker_process;
305 ScopedHandle worker_thread; 305 ScopedHandle worker_thread;
306 if (!LaunchProcessWithToken( 306 if (!LaunchProcessWithToken(
307 command_line.GetProgram(), command_line.GetCommandLineString(), 307 command_line.GetProgram(), command_line.GetCommandLineString(),
308 token.Get(), &process_attributes, &thread_attributes, 308 token.Get(), &process_attributes, &thread_attributes,
309 handles_to_inherit, /* creation_flags= */ 0, 309 handles_to_inherit, /* creation_flags= */ 0,
310 /* thread_attributes= */ nullptr, &worker_process, &worker_thread)) { 310 /* thread_attributes= */ nullptr, &worker_process, &worker_thread)) {
311 ReportFatalError(); 311 ReportFatalError();
312 return; 312 return;
313 } 313 }
314 process.Connect(worker_process.Get(), mojo_channel.PassServerHandle()); 314 process.Connect(worker_process.Get(),
315 mojo::edk::ConnectionParams(mojo_channel.PassServerHandle()));
315 316
316 channel_ = std::move(server); 317 channel_ = std::move(server);
317 318
318 ReportProcessLaunched(std::move(worker_process)); 319 ReportProcessLaunched(std::move(worker_process));
319 } 320 }
320 321
321 void UnprivilegedProcessDelegate::Send(IPC::Message* message) { 322 void UnprivilegedProcessDelegate::Send(IPC::Message* message) {
322 DCHECK(CalledOnValidThread()); 323 DCHECK(CalledOnValidThread());
323 324
324 if (channel_) { 325 if (channel_) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 PLOG(ERROR) << "Failed to duplicate a handle"; 402 PLOG(ERROR) << "Failed to duplicate a handle";
402 ReportFatalError(); 403 ReportFatalError();
403 return; 404 return;
404 } 405 }
405 ScopedHandle limited_handle(temp_handle); 406 ScopedHandle limited_handle(temp_handle);
406 407
407 event_handler_->OnProcessLaunched(std::move(limited_handle)); 408 event_handler_->OnProcessLaunched(std::move(limited_handle));
408 } 409 }
409 410
410 } // namespace remoting 411 } // namespace remoting
OLDNEW
« no previous file with comments | « mojo/edk/test/multiprocess_test_helper.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