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 80a5df9a4a90ab3cf393c664d9a7e4c30bb8ad21..8bbc896a27fe80e1ec841256eec10cddf4fc28c2 100644 |
--- a/remoting/host/it2me/it2me_native_messaging_host_main.cc |
+++ b/remoting/host/it2me/it2me_native_messaging_host_main.cc |
@@ -36,16 +36,9 @@ int It2MeNativeMessagingHostMain() { |
run_loop.QuitClosure()); |
scoped_ptr<It2MeHostFactory> factory(new It2MeHostFactory()); |
- scoped_ptr<NativeMessagingChannel::Delegate> host( |
+ scoped_ptr<It2MeNativeMessagingHost> host( |
new It2MeNativeMessagingHost(task_runner, factory.Pass())); |
- |
- NativeMessagingChannel::Delegate* host_ptr = host.get(); |
- |
- // Set up the native messaging channel. |
- scoped_ptr<NativeMessagingChannel> channel( |
- new NativeMessagingChannel(host.Pass(), read_file, write_file)); |
- channel->Start(base::Bind(&It2MeNativeMessagingHost::ShutDownHost, |
- base::Unretained(host_ptr))); |
+ host->Start(read_file, write_file, run_loop.QuitClosure()); |
// Run the loop until channel is alive. |
run_loop.Run(); |