OLD | NEW |
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/jingle_stream_connector.h" | 5 #include "remoting/protocol/jingle_stream_connector.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "jingle/glue/channel_socket_adapter.h" | 8 #include "jingle/glue/channel_socket_adapter.h" |
9 #include "jingle/glue/pseudotcp_adapter.h" | 9 #include "jingle/glue/pseudotcp_adapter.h" |
10 #include "net/base/cert_status_flags.h" | 10 #include "net/base/cert_status_flags.h" |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 break; | 217 break; |
218 | 218 |
219 case ChannelAuthenticator::FAILURE: | 219 case ChannelAuthenticator::FAILURE: |
220 NotifyError(); | 220 NotifyError(); |
221 break; | 221 break; |
222 } | 222 } |
223 } | 223 } |
224 | 224 |
225 void JingleStreamConnector::NotifyDone(net::StreamSocket* socket) { | 225 void JingleStreamConnector::NotifyDone(net::StreamSocket* socket) { |
226 session_->OnChannelConnectorFinished(name_, this); | 226 session_->OnChannelConnectorFinished(name_, this); |
227 callback_.Run(name_, socket); | 227 callback_.Run(socket); |
228 delete this; | 228 delete this; |
229 } | 229 } |
230 | 230 |
231 void JingleStreamConnector::NotifyError() { | 231 void JingleStreamConnector::NotifyError() { |
232 socket_.reset(); | 232 socket_.reset(); |
233 NotifyDone(NULL); | 233 NotifyDone(NULL); |
234 } | 234 } |
235 | 235 |
236 } // namespace protocol | 236 } // namespace protocol |
237 } // namespace remoting | 237 } // namespace remoting |
OLD | NEW |