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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/protocol/pepper_session.h ('k') | remoting/protocol/pepper_stream_channel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/protocol/pepper_session.h" 5 #include "remoting/protocol/pepper_session.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/rand_util.h" 8 #include "base/rand_util.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 session_manager_->transport_config_, remote_cert_); 119 session_manager_->transport_config_, remote_cert_);
120 } 120 }
121 121
122 void PepperSession::CreateDatagramChannel( 122 void PepperSession::CreateDatagramChannel(
123 const std::string& name, 123 const std::string& name,
124 const DatagramChannelCallback& callback) { 124 const DatagramChannelCallback& callback) {
125 // TODO(sergeyu): Implement datagram channel support. 125 // TODO(sergeyu): Implement datagram channel support.
126 NOTREACHED(); 126 NOTREACHED();
127 } 127 }
128 128
129 void PepperSession::CancelChannelCreation(const std::string& name) {
130 ChannelsMap::iterator it = channels_.find(name);
131 if (it != channels_.end() && !it->second->is_connected()) {
132 delete it->second;
133 DCHECK(!channels_[name]);
134 }
135 }
136
129 net::Socket* PepperSession::control_channel() { 137 net::Socket* PepperSession::control_channel() {
130 DCHECK(CalledOnValidThread()); 138 DCHECK(CalledOnValidThread());
131 return control_channel_socket_.get(); 139 return control_channel_socket_.get();
132 } 140 }
133 141
134 net::Socket* PepperSession::event_channel() { 142 net::Socket* PepperSession::event_channel() {
135 DCHECK(CalledOnValidThread()); 143 DCHECK(CalledOnValidThread());
136 return event_channel_socket_.get(); 144 return event_channel_socket_.get();
137 } 145 }
138 146
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 DCHECK_NE(state_, FAILED); 418 DCHECK_NE(state_, FAILED);
411 419
412 state_ = new_state; 420 state_ = new_state;
413 if (!state_change_callback_.is_null()) 421 if (!state_change_callback_.is_null())
414 state_change_callback_.Run(new_state); 422 state_change_callback_.Run(new_state);
415 } 423 }
416 } 424 }
417 425
418 } // namespace protocol 426 } // namespace protocol
419 } // namespace remoting 427 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/pepper_session.h ('k') | remoting/protocol/pepper_stream_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698