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

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
« no previous file with comments | « remoting/protocol/connection_to_client_unittest.cc ('k') | remoting/protocol/fake_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/fake_session.h
diff --git a/remoting/protocol/fake_session.h b/remoting/protocol/fake_session.h
index 5683241d5b4e581f91ecfc052d0ec30eca4ad2da..1d4519f9416365ce01d0becdd1912ebef928b6d0 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 NotifyStreamChannelCallback(
+ const std::string& name,
+ const StreamChannelCallback& callback);
+ void NotifyDatagramChannelCallback(
+ 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);
};
« no previous file with comments | « remoting/protocol/connection_to_client_unittest.cc ('k') | remoting/protocol/fake_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698