| 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/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 11 matching lines...) Expand all Loading... |
| 22 SSLSocketAdapter* SSLSocketAdapter::Create(AsyncSocket* socket) { | 22 SSLSocketAdapter* SSLSocketAdapter::Create(AsyncSocket* socket) { |
| 23 return new SSLSocketAdapter(socket); | 23 return new SSLSocketAdapter(socket); |
| 24 } | 24 } |
| 25 | 25 |
| 26 SSLSocketAdapter::SSLSocketAdapter(AsyncSocket* socket) | 26 SSLSocketAdapter::SSLSocketAdapter(AsyncSocket* socket) |
| 27 : SSLAdapter(socket), | 27 : SSLAdapter(socket), |
| 28 ignore_bad_cert_(false), | 28 ignore_bad_cert_(false), |
| 29 cert_verifier_(new net::CertVerifier()), | 29 cert_verifier_(new net::CertVerifier()), |
| 30 ssl_state_(SSLSTATE_NONE), | 30 ssl_state_(SSLSTATE_NONE), |
| 31 read_state_(IOSTATE_NONE), | 31 read_state_(IOSTATE_NONE), |
| 32 write_state_(IOSTATE_NONE) { | 32 write_state_(IOSTATE_NONE), |
| 33 data_transferred_(0) { |
| 33 transport_socket_ = new TransportSocket(socket, this); | 34 transport_socket_ = new TransportSocket(socket, this); |
| 34 } | 35 } |
| 35 | 36 |
| 36 SSLSocketAdapter::~SSLSocketAdapter() { | 37 SSLSocketAdapter::~SSLSocketAdapter() { |
| 37 } | 38 } |
| 38 | 39 |
| 39 int SSLSocketAdapter::StartSSL(const char* hostname, bool restartable) { | 40 int SSLSocketAdapter::StartSSL(const char* hostname, bool restartable) { |
| 40 DCHECK(!restartable); | 41 DCHECK(!restartable); |
| 41 hostname_ = hostname; | 42 hostname_ = hostname; |
| 42 | 43 |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 write_buffer_len_ = buffer_len; | 372 write_buffer_len_ = buffer_len; |
| 372 return; | 373 return; |
| 373 } | 374 } |
| 374 } | 375 } |
| 375 was_used_to_convey_data_ = true; | 376 was_used_to_convey_data_ = true; |
| 376 callback.Run(result); | 377 callback.Run(result); |
| 377 } | 378 } |
| 378 } | 379 } |
| 379 | 380 |
| 380 } // namespace remoting | 381 } // namespace remoting |
| OLD | NEW |