| 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..2dca61ffb6aa1145d1f35759f5213fa27c49fc3e 100644
|
| --- a/remoting/host/it2me/it2me_native_messaging_host_main.cc
|
| +++ b/remoting/host/it2me/it2me_native_messaging_host_main.cc
|
| @@ -36,16 +36,15 @@ int It2MeNativeMessagingHostMain() {
|
| run_loop.QuitClosure());
|
|
|
| scoped_ptr<It2MeHostFactory> factory(new It2MeHostFactory());
|
| - scoped_ptr<NativeMessagingChannel::Delegate> 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)));
|
| + new NativeMessagingChannel(read_file, write_file));
|
| +
|
| + scoped_ptr<It2MeNativeMessagingHost> host(
|
| + new It2MeNativeMessagingHost(
|
| + task_runner, channel.Pass(), factory.Pass()));
|
| + host->Start(run_loop.QuitClosure());
|
|
|
| // Run the loop until channel is alive.
|
| run_loop.Run();
|
|
|