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 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1653 cert_request_info->Reset(); | 1653 cert_request_info->Reset(); |
1654 } | 1654 } |
1655 } | 1655 } |
1656 | 1656 |
1657 SSLClientSocket::NextProtoStatus MockSSLClientSocket::GetNextProto( | 1657 SSLClientSocket::NextProtoStatus MockSSLClientSocket::GetNextProto( |
1658 std::string* proto) const { | 1658 std::string* proto) const { |
1659 *proto = data_->next_proto; | 1659 *proto = data_->next_proto; |
1660 return data_->next_proto_status; | 1660 return data_->next_proto_status; |
1661 } | 1661 } |
1662 | 1662 |
1663 bool MockSSLClientSocket::WasChannelIDSent() const { | |
1664 return data_->channel_id_sent; | |
1665 } | |
1666 | |
1667 void MockSSLClientSocket::set_channel_id_sent(bool channel_id_sent) { | |
1668 data_->channel_id_sent = channel_id_sent; | |
1669 } | |
1670 | |
1671 ChannelIDService* MockSSLClientSocket::GetChannelIDService() const { | 1663 ChannelIDService* MockSSLClientSocket::GetChannelIDService() const { |
1672 return data_->channel_id_service; | 1664 return data_->channel_id_service; |
1673 } | 1665 } |
1674 | 1666 |
1675 void MockSSLClientSocket::OnReadComplete(const MockRead& data) { | 1667 void MockSSLClientSocket::OnReadComplete(const MockRead& data) { |
1676 NOTIMPLEMENTED(); | 1668 NOTIMPLEMENTED(); |
1677 } | 1669 } |
1678 | 1670 |
1679 void MockSSLClientSocket::OnWriteComplete(int rv) { | 1671 void MockSSLClientSocket::OnWriteComplete(int rv) { |
1680 NOTIMPLEMENTED(); | 1672 NOTIMPLEMENTED(); |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2173 | 2165 |
2174 const char kSOCKS5OkRequest[] = | 2166 const char kSOCKS5OkRequest[] = |
2175 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; | 2167 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; |
2176 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); | 2168 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); |
2177 | 2169 |
2178 const char kSOCKS5OkResponse[] = | 2170 const char kSOCKS5OkResponse[] = |
2179 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; | 2171 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; |
2180 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); | 2172 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); |
2181 | 2173 |
2182 } // namespace net | 2174 } // namespace net |
OLD | NEW |