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

Unified Diff: remoting/host/chromoting_host_context.cc

Issue 10837291: [Chromoting] Moving the daemon IPC channel to ChromotingHostContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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/chromoting_host_context.cc
diff --git a/remoting/host/chromoting_host_context.cc b/remoting/host/chromoting_host_context.cc
index 480de732922a9282de5dac6a984b884150f6f2ec..a3a24443ef2b7d53cbb4e7320c396459505b51bf 100644
--- a/remoting/host/chromoting_host_context.cc
+++ b/remoting/host/chromoting_host_context.cc
@@ -8,6 +8,8 @@
#include "base/bind.h"
#include "base/threading/thread.h"
+#include "ipc/ipc_channel.h"
+#include "ipc/ipc_channel_proxy.h"
#include "remoting/host/url_request_context.h"
namespace remoting {
@@ -66,6 +68,21 @@ base::SingleThreadTaskRunner* ChromotingHostContext::file_task_runner() {
return file_thread_.message_loop_proxy();
}
+IPC::ChannelProxy* ChromotingHostContext::daemon_channel() {
+ return daemon_channel_.get();
+}
+
+void ChromotingHostContext::ConnectToDaemon(const std::string& channel_name,
+ IPC::Listener* listener) {
+ daemon_channel_.reset(new IPC::ChannelProxy(
+ channel_name, IPC::Channel::MODE_CLIENT, listener,
+ network_task_runner()));
+}
+
+void ChromotingHostContext::DisconnectFromDaemon() {
+ daemon_channel_.reset(NULL);
+}
+
const scoped_refptr<net::URLRequestContextGetter>&
ChromotingHostContext::url_request_context_getter() {
DCHECK(url_request_context_getter_.get());

Powered by Google App Engine
This is Rietveld 408576698