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

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

Issue 103693006: Me2me Native Messaging host on Windows: restructure NativeMessagingHost and NativeMessagingChannel.… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years 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
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();

Powered by Google App Engine
This is Rietveld 408576698