| Index: remoting/protocol/fake_session.h
|
| diff --git a/remoting/protocol/fake_session.h b/remoting/protocol/fake_session.h
|
| index f6120299757e337d8fa3d645ca6ed0df3c1c417f..3ca7fc395e854505e5a54638b0acdad10ef712ee 100644
|
| --- a/remoting/protocol/fake_session.h
|
| +++ b/remoting/protocol/fake_session.h
|
| @@ -12,12 +12,30 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "remoting/protocol/fake_stream_socket.h"
|
| #include "remoting/protocol/session.h"
|
| +#include "remoting/protocol/transport.h"
|
|
|
| namespace remoting {
|
| namespace protocol {
|
|
|
| extern const char kTestJid[];
|
|
|
| +class FakeTransportSession : public TransportSession {
|
| + public:
|
| + FakeTransportSession();
|
| + ~FakeTransportSession() override;
|
| +
|
| + // TransportSession interface.
|
| + void Start(EventHandler* event_handler,
|
| + Authenticator* authenticator) override;
|
| + bool ProcessTransportInfo(buzz::XmlElement* transport_info) override;
|
| + DatagramChannelFactory* GetDatagramChannelFactory() override;
|
| + FakeStreamChannelFactory* GetStreamChannelFactory() override;
|
| + FakeStreamChannelFactory* GetMultiplexedChannelFactory() override;
|
| +
|
| + private:
|
| + FakeStreamChannelFactory channel_factory_;
|
| +};
|
| +
|
| // FakeSession is a dummy protocol::Session that uses FakeStreamSocket for all
|
| // channels.
|
| class FakeSession : public Session {
|
| @@ -31,26 +49,23 @@ class FakeSession : public Session {
|
|
|
| bool is_closed() const { return closed_; }
|
|
|
| - FakeStreamChannelFactory& fake_channel_factory() { return channel_factory_; }
|
| -
|
| // Session interface.
|
| void SetEventHandler(EventHandler* event_handler) override;
|
| ErrorCode error() override;
|
| const std::string& jid() override;
|
| const SessionConfig& config() override;
|
| - StreamChannelFactory* GetTransportChannelFactory() override;
|
| - StreamChannelFactory* GetMultiplexedChannelFactory() override;
|
| - StreamChannelFactory* GetQuicChannelFactory() override;
|
| + FakeTransportSession* GetTransportSession() override;
|
| + FakeStreamChannelFactory* GetQuicChannelFactory() override;
|
| void Close() override;
|
|
|
| public:
|
| EventHandler* event_handler_;
|
| scoped_ptr<SessionConfig> config_;
|
|
|
| - FakeStreamChannelFactory channel_factory_;
|
| -
|
| std::string jid_;
|
|
|
| + FakeTransportSession transport_session_;
|
| +
|
| ErrorCode error_;
|
| bool closed_;
|
|
|
|
|