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

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

Issue 591463003: Remote Assistance on Chrome OS Part III - NativeMessageHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@native_messaging
Patch Set: Fix NativeMessagingBasic test on Release builds Created 6 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
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 25f5021a2b0447d7ca60c22ea9a45e18618f7435..7d27d19e1d061c7755e4bb0aaef44aef174ec73d 100644
--- a/remoting/host/it2me/it2me_native_messaging_host_main.cc
+++ b/remoting/host/it2me/it2me_native_messaging_host_main.cc
@@ -16,6 +16,7 @@
#include "remoting/host/host_exit_codes.h"
#include "remoting/host/it2me/it2me_native_messaging_host.h"
#include "remoting/host/logging.h"
+#include "remoting/host/native_messaging/native_messaging_pipe.h"
#include "remoting/host/native_messaging/pipe_messaging_channel.h"
#include "remoting/host/usage_stats_consent.h"
@@ -117,13 +118,21 @@ int StartIt2MeNativeMessagingHost() {
scoped_ptr<It2MeHostFactory> factory(new It2MeHostFactory());
+ scoped_ptr<NativeMessagingPipe> native_messaging_pipe(
+ new NativeMessagingPipe());
+
// Set up the native messaging channel.
scoped_ptr<extensions::NativeMessagingChannel> channel(
new PipeMessagingChannel(read_file.Pass(), write_file.Pass()));
- scoped_ptr<It2MeNativeMessagingHost> host(new It2MeNativeMessagingHost(
- task_runner, channel.Pass(), factory.Pass()));
- host->Start(run_loop.QuitClosure());
+ scoped_ptr<extensions::NativeMessageHost> host(new It2MeNativeMessagingHost(
+ task_runner,
+ factory.Pass()));
+
+ host->Start(native_messaging_pipe.get());
+
+ native_messaging_pipe->Start(
+ host.Pass(), channel.Pass(), run_loop.QuitClosure());
// Run the loop until channel is alive.
run_loop.Run();
« no previous file with comments | « remoting/host/it2me/it2me_native_messaging_host.cc ('k') | remoting/host/it2me/it2me_native_messaging_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698