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

Unified Diff: remoting/protocol/fake_session.h

Issue 10981009: Fix ChannelMultiplexer to properly handle base channel creation failure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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/protocol/fake_session.h
diff --git a/remoting/protocol/fake_session.h b/remoting/protocol/fake_session.h
index 5683241d5b4e581f91ecfc052d0ec30eca4ad2da..2e4f2c76ed86c446eab1a2944e71ca26f700022f 100644
--- a/remoting/protocol/fake_session.h
+++ b/remoting/protocol/fake_session.h
@@ -155,8 +155,8 @@ class FakeSession : public Session,
EventHandler* event_handler() { return event_handler_; }
- void set_message_loop(MessageLoop* message_loop) {
- message_loop_ = message_loop;
+ void set_async_creation(bool async_creation) {
+ async_creation_ = async_creation;
}
void set_error(ErrorCode error) { error_ = error; }
@@ -179,18 +179,28 @@ class FakeSession : public Session,
// ChannelFactory interface.
virtual void CreateStreamChannel(
- const std::string& name, const StreamChannelCallback& callback) OVERRIDE;
+ const std::string& name,
+ const StreamChannelCallback& callback) OVERRIDE;
virtual void CreateDatagramChannel(
const std::string& name,
const DatagramChannelCallback& callback) OVERRIDE;
virtual void CancelChannelCreation(const std::string& name) OVERRIDE;
public:
+ void CallStreamChannelCallback(
Wez 2012/09/25 17:43:58 nit: NotifyStreamChannelConnected/NotifyStreamChan
Sergey Ulanov 2012/09/25 18:59:08 Done.
+ const std::string& name,
+ const StreamChannelCallback& callback);
+ void CallDatagramChannelCallback(
+ const std::string& name,
+ const DatagramChannelCallback& callback);
+
EventHandler* event_handler_;
scoped_ptr<const CandidateSessionConfig> candidate_config_;
SessionConfig config_;
MessageLoop* message_loop_;
+ bool async_creation_;
+
std::map<std::string, FakeSocket*> stream_channels_;
std::map<std::string, FakeUdpSocket*> datagram_channels_;
@@ -199,6 +209,8 @@ class FakeSession : public Session,
ErrorCode error_;
bool closed_;
+ base::WeakPtrFactory<FakeSession> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(FakeSession);
};

Powered by Google App Engine
This is Rietveld 408576698