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

Unified Diff: remoting/protocol/pepper_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
Index: remoting/protocol/pepper_session.cc
diff --git a/remoting/protocol/pepper_session.cc b/remoting/protocol/pepper_session.cc
index 373bfc3009df75270b767d07ede7b656e2d6bec3..43f19ec10b5b779a9e924862a5ce5d9cc03c49a0 100644
--- a/remoting/protocol/pepper_session.cc
+++ b/remoting/protocol/pepper_session.cc
@@ -126,6 +126,14 @@ void PepperSession::CreateDatagramChannel(
NOTREACHED();
}
+void PepperSession::CancelChannelCreation(const std::string& name) {
+ ChannelsMap::iterator it = channels_.find(name);
+ if (it != channels_.end() && !it->second->connected()) {
+ delete it->second;
+ DCHECK(!channels_[name]);
+ }
+}
+
net::Socket* PepperSession::control_channel() {
DCHECK(CalledOnValidThread());
return control_channel_socket_.get();

Powered by Google App Engine
This is Rietveld 408576698