Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/socket/socket_test_util.h" | 5 #include "net/socket/socket_test_util.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1125 return -1; | 1125 return -1; |
| 1126 } | 1126 } |
| 1127 | 1127 |
| 1128 base::TimeDelta MockSSLClientSocket::GetConnectTimeMicros() const { | 1128 base::TimeDelta MockSSLClientSocket::GetConnectTimeMicros() const { |
| 1129 return base::TimeDelta::FromMicroseconds(-1); | 1129 return base::TimeDelta::FromMicroseconds(-1); |
| 1130 } | 1130 } |
| 1131 | 1131 |
| 1132 void MockSSLClientSocket::GetSSLInfo(SSLInfo* ssl_info) { | 1132 void MockSSLClientSocket::GetSSLInfo(SSLInfo* ssl_info) { |
| 1133 ssl_info->Reset(); | 1133 ssl_info->Reset(); |
| 1134 ssl_info->cert = data_->cert; | 1134 ssl_info->cert = data_->cert; |
| 1135 ssl_info->client_cert_sent = data_->client_cert_sent; | 1135 ssl_info->client_cert_sent = WasOriginBoundCertSent() || |
| 1136 data_->client_cert_sent; | |
|
wtc
2012/02/24 00:56:57
I believe this change is unnecessary/wrong for the
mattm
2012/02/24 03:09:58
hmm, well that would mean tests would need to reme
wtc
2012/02/24 04:23:35
I didn't look at the unit tests, so I don't know t
| |
| 1136 } | 1137 } |
| 1137 | 1138 |
| 1138 void MockSSLClientSocket::GetSSLCertRequestInfo( | 1139 void MockSSLClientSocket::GetSSLCertRequestInfo( |
| 1139 SSLCertRequestInfo* cert_request_info) { | 1140 SSLCertRequestInfo* cert_request_info) { |
| 1140 DCHECK(cert_request_info); | 1141 DCHECK(cert_request_info); |
| 1141 if (data_->cert_request_info) { | 1142 if (data_->cert_request_info) { |
| 1142 cert_request_info->host_and_port = | 1143 cert_request_info->host_and_port = |
| 1143 data_->cert_request_info->host_and_port; | 1144 data_->cert_request_info->host_and_port; |
| 1144 cert_request_info->client_certs = data_->cert_request_info->client_certs; | 1145 cert_request_info->client_certs = data_->cert_request_info->client_certs; |
| 1145 } else { | 1146 } else { |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1619 | 1620 |
| 1620 const char kSOCKS5OkRequest[] = | 1621 const char kSOCKS5OkRequest[] = |
| 1621 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; | 1622 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; |
| 1622 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); | 1623 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); |
| 1623 | 1624 |
| 1624 const char kSOCKS5OkResponse[] = | 1625 const char kSOCKS5OkResponse[] = |
| 1625 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; | 1626 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; |
| 1626 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); | 1627 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); |
| 1627 | 1628 |
| 1628 } // namespace net | 1629 } // namespace net |
| OLD | NEW |