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

Side by Side Diff: remoting/protocol/jingle_stream_connector.cc

Issue 7605018: Simplify channel creation callbacks in remoting::Session interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
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/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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698