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 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1217 ssl_info->channel_id_sent = data_->channel_id_sent; | 1217 ssl_info->channel_id_sent = data_->channel_id_sent; |
| 1218 return true; | 1218 return true; |
| 1219 } | 1219 } |
| 1220 | 1220 |
| 1221 void MockSSLClientSocket::GetSSLCertRequestInfo( | 1221 void MockSSLClientSocket::GetSSLCertRequestInfo( |
| 1222 SSLCertRequestInfo* cert_request_info) { | 1222 SSLCertRequestInfo* cert_request_info) { |
| 1223 DCHECK(cert_request_info); | 1223 DCHECK(cert_request_info); |
| 1224 if (data_->cert_request_info) { | 1224 if (data_->cert_request_info) { |
| 1225 cert_request_info->host_and_port = | 1225 cert_request_info->host_and_port = |
| 1226 data_->cert_request_info->host_and_port; | 1226 data_->cert_request_info->host_and_port; |
| 1227 cert_request_info->client_certs = data_->cert_request_info->client_certs; | |
| 1228 } else { | |
| 1229 cert_request_info->Reset(); | |
| 1230 } | 1227 } |
|
Ryan Sleevi
2013/01/29 19:59:49
BUG: This change is not correct:
1) You should mat
ppi
2013/01/30 15:34:56
I see, thanks. Reverted in patch set 4. We will pr
| |
| 1231 } | 1228 } |
| 1232 | 1229 |
| 1233 SSLClientSocket::NextProtoStatus MockSSLClientSocket::GetNextProto( | 1230 SSLClientSocket::NextProtoStatus MockSSLClientSocket::GetNextProto( |
| 1234 std::string* proto, std::string* server_protos) { | 1231 std::string* proto, std::string* server_protos) { |
| 1235 *proto = data_->next_proto; | 1232 *proto = data_->next_proto; |
| 1236 *server_protos = data_->server_protos; | 1233 *server_protos = data_->server_protos; |
| 1237 return data_->next_proto_status; | 1234 return data_->next_proto_status; |
| 1238 } | 1235 } |
| 1239 | 1236 |
| 1240 bool MockSSLClientSocket::set_was_npn_negotiated(bool negotiated) { | 1237 bool MockSSLClientSocket::set_was_npn_negotiated(bool negotiated) { |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1706 | 1703 |
| 1707 const char kSOCKS5OkRequest[] = | 1704 const char kSOCKS5OkRequest[] = |
| 1708 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; | 1705 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; |
| 1709 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); | 1706 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); |
| 1710 | 1707 |
| 1711 const char kSOCKS5OkResponse[] = | 1708 const char kSOCKS5OkResponse[] = |
| 1712 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; | 1709 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; |
| 1713 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); | 1710 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); |
| 1714 | 1711 |
| 1715 } // namespace net | 1712 } // namespace net |
| OLD | NEW |