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

Side by Side Diff: remoting/jingle_glue/ssl_socket_adapter.cc

Issue 8801004: base::Bind: Convert StreamSocket::Connect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fixes. Created 9 years 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/jingle_glue/ssl_socket_adapter.h" 5 #include "remoting/jingle_glue/ssl_socket_adapter.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "jingle/glue/utils.h" 10 #include "jingle/glue/utils.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 TransportSocket::~TransportSocket() { 200 TransportSocket::~TransportSocket() {
201 } 201 }
202 202
203 int TransportSocket::Connect(net::OldCompletionCallback* callback) { 203 int TransportSocket::Connect(net::OldCompletionCallback* callback) {
204 // Connect is never called by SSLClientSocket, instead SSLSocketAdapter 204 // Connect is never called by SSLClientSocket, instead SSLSocketAdapter
205 // calls Connect() on socket_ directly. 205 // calls Connect() on socket_ directly.
206 NOTREACHED(); 206 NOTREACHED();
207 return false; 207 return false;
208 } 208 }
209 int TransportSocket::Connect(const net::CompletionCallback& callback) {
210 // Connect is never called by SSLClientSocket, instead SSLSocketAdapter
211 // calls Connect() on socket_ directly.
212 NOTREACHED();
213 return false;
214 }
209 215
210 void TransportSocket::Disconnect() { 216 void TransportSocket::Disconnect() {
211 socket_->Close(); 217 socket_->Close();
212 } 218 }
213 219
214 bool TransportSocket::IsConnected() const { 220 bool TransportSocket::IsConnected() const {
215 return (socket_->GetState() == talk_base::Socket::CS_CONNECTED); 221 return (socket_->GetState() == talk_base::Socket::CS_CONNECTED);
216 } 222 }
217 223
218 bool TransportSocket::IsConnectedAndIdle() const { 224 bool TransportSocket::IsConnectedAndIdle() const {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 write_buffer_len_ = buffer_len; 381 write_buffer_len_ = buffer_len;
376 return; 382 return;
377 } 383 }
378 } 384 }
379 was_used_to_convey_data_ = true; 385 was_used_to_convey_data_ = true;
380 callback->RunWithParams(Tuple1<int>(result)); 386 callback->RunWithParams(Tuple1<int>(result));
381 } 387 }
382 } 388 }
383 389
384 } // namespace remoting 390 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698