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

Unified Diff: remoting/protocol/jingle_session.cc

Issue 8573013: Add CancelChannelCreation() in protocol::Session interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 1 month 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/jingle_session.h ('k') | remoting/protocol/pepper_channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/jingle_session.cc
diff --git a/remoting/protocol/jingle_session.cc b/remoting/protocol/jingle_session.cc
index cbc404e73651c4ee67204bb4a72118546223b78d..e0b94508ee8255c35c554e1fc20cf8e01cbc13f5 100644
--- a/remoting/protocol/jingle_session.cc
+++ b/remoting/protocol/jingle_session.cc
@@ -172,6 +172,14 @@ void JingleSession::CreateDatagramChannel(
name, new JingleDatagramConnector(this, name, callback));
}
+void JingleSession::CancelChannelCreation(const std::string& name) {
+ ChannelConnectorsMap::iterator it = channel_connectors_.find(name);
+ if (it != channel_connectors_.end()) {
+ delete it->second;
+ channel_connectors_.erase(it);
+ }
+}
+
net::Socket* JingleSession::control_channel() {
DCHECK(CalledOnValidThread());
return control_channel_socket_.get();
@@ -432,7 +440,7 @@ void JingleSession::OnChannelConnectorFinished(
const std::string& name, JingleChannelConnector* connector) {
DCHECK(CalledOnValidThread());
DCHECK_EQ(channel_connectors_[name], connector);
- channel_connectors_[name] = NULL;
+ channel_connectors_.erase(name);
}
void JingleSession::CreateChannels() {
« no previous file with comments | « remoting/protocol/jingle_session.h ('k') | remoting/protocol/pepper_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698