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

Unified Diff: remoting/host/it2me/it2me_native_messaging_host_main.cc

Issue 887853002: Shutdown the It2Me host cleanly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@it2me_host_dcheck
Patch Set: Created 5 years, 11 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 | « no previous file | remoting/host/it2me/it2me_native_messaging_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/it2me/it2me_native_messaging_host_main.cc
diff --git a/remoting/host/it2me/it2me_native_messaging_host_main.cc b/remoting/host/it2me/it2me_native_messaging_host_main.cc
index a89ee5296ee47c76b8609785904ba811a47c6053..244f7301aa2222d88531ebcc21baa686fc117ac5 100644
--- a/remoting/host/it2me/it2me_native_messaging_host_main.cc
+++ b/remoting/host/it2me/it2me_native_messaging_host_main.cc
@@ -109,10 +109,6 @@ int StartIt2MeNativeMessagingHost() {
base::MessageLoopForUI message_loop;
base::RunLoop run_loop;
- scoped_refptr<AutoThreadTaskRunner> task_runner =
- new remoting::AutoThreadTaskRunner(message_loop.message_loop_proxy(),
- run_loop.QuitClosure());
-
scoped_ptr<It2MeHostFactory> factory(new It2MeHostFactory());
scoped_ptr<NativeMessagingPipe> native_messaging_pipe(
@@ -122,13 +118,15 @@ int StartIt2MeNativeMessagingHost() {
scoped_ptr<extensions::NativeMessagingChannel> channel(
new PipeMessagingChannel(read_file.Pass(), write_file.Pass()));
- scoped_ptr<extensions::NativeMessageHost> host(new It2MeNativeMessagingHost(
- ChromotingHostContext::Create(task_runner), factory.Pass()));
+ scoped_ptr<ChromotingHostContext> context =
+ ChromotingHostContext::Create(new remoting::AutoThreadTaskRunner(
+ message_loop.message_loop_proxy(), run_loop.QuitClosure()));
+ scoped_ptr<extensions::NativeMessageHost> host(
+ new It2MeNativeMessagingHost(context.Pass(), factory.Pass()));
host->Start(native_messaging_pipe.get());
- native_messaging_pipe->Start(
- host.Pass(), channel.Pass(), run_loop.QuitClosure());
+ native_messaging_pipe->Start(host.Pass(), channel.Pass());
// Run the loop until channel is alive.
run_loop.Run();
« no previous file with comments | « no previous file | remoting/host/it2me/it2me_native_messaging_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698