Index: remoting/protocol/channel_dispatcher_base.cc |
diff --git a/remoting/protocol/channel_dispatcher_base.cc b/remoting/protocol/channel_dispatcher_base.cc |
index ca97ecb9ffd89b20a9e97aa99f8f0aa5d46b0457..7eb88e0cb11617b99bfd11659c128c659e4384cb 100644 |
--- a/remoting/protocol/channel_dispatcher_base.cc |
+++ b/remoting/protocol/channel_dispatcher_base.cc |
@@ -6,6 +6,7 @@ |
#include "base/bind.h" |
#include "net/socket/stream_socket.h" |
+#include "remoting/protocol/channel_factory.h" |
#include "remoting/protocol/session.h" |
namespace remoting { |
@@ -13,21 +14,21 @@ namespace protocol { |
ChannelDispatcherBase::ChannelDispatcherBase(const char* channel_name) |
: channel_name_(channel_name), |
- session_(NULL) { |
+ channel_factory_(NULL) { |
} |
ChannelDispatcherBase::~ChannelDispatcherBase() { |
- if (session_) |
- session_->CancelChannelCreation(channel_name_); |
+ if (channel_factory_) |
+ channel_factory_->CancelChannelCreation(channel_name_); |
} |
void ChannelDispatcherBase::Init(Session* session, |
const InitializedCallback& callback) { |
DCHECK(session); |
- session_ = session; |
+ channel_factory_ = session->GetTransportChannelFactory(); |
initialized_callback_ = callback; |
- session_->CreateStreamChannel(channel_name_, base::Bind( |
+ channel_factory_->CreateStreamChannel(channel_name_, base::Bind( |
&ChannelDispatcherBase::OnChannelReady, base::Unretained(this))); |
} |