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

Unified Diff: remoting/host/daemon_process_win.cc

Issue 2424353002: Use ChannelMojo between the remoting daemon and network processes. (Closed)
Patch Set: sans test changes Created 4 years, 2 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/DEPS ('k') | remoting/host/host_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/daemon_process_win.cc
diff --git a/remoting/host/daemon_process_win.cc b/remoting/host/daemon_process_win.cc
index 17961d5a440bca16364b3657484479843c4e8efc..dd7959f491255f007806783bca9af070f5f5e0fa 100644
--- a/remoting/host/daemon_process_win.cc
+++ b/remoting/host/daemon_process_win.cc
@@ -25,6 +25,7 @@
#include "base/win/win_util.h"
#include "ipc/ipc_message.h"
#include "ipc/ipc_message_macros.h"
+#include "mojo/edk/embedder/scoped_ipc_support.h"
#include "remoting/base/auto_thread_task_runner.h"
#include "remoting/base/scoped_sc_handle_win.h"
#include "remoting/host/branding.h"
@@ -105,6 +106,11 @@ class DaemonProcessWin : public DaemonProcess {
bool OpenPairingRegistry();
private:
+ // Mojo keeps the task runner passed to it alive forever, so an
+ // AutoThreadTaskRunner should not be passed to it. Otherwise, the process may
+ // never shut down cleanly.
+ mojo::edk::ScopedIPCSupport ipc_support_;
+
std::unique_ptr<WorkerProcessLauncher> network_launcher_;
// Handle of the network process.
@@ -120,8 +126,8 @@ DaemonProcessWin::DaemonProcessWin(
scoped_refptr<AutoThreadTaskRunner> caller_task_runner,
scoped_refptr<AutoThreadTaskRunner> io_task_runner,
const base::Closure& stopped_callback)
- : DaemonProcess(caller_task_runner, io_task_runner, stopped_callback) {
-}
+ : DaemonProcess(caller_task_runner, io_task_runner, stopped_callback),
+ ipc_support_(io_task_runner->task_runner()) {}
DaemonProcessWin::~DaemonProcessWin() {
}
« no previous file with comments | « remoting/host/DEPS ('k') | remoting/host/host_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698