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 <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 unsigned int outlen) { | 826 unsigned int outlen) { |
827 memset(out, 'A', outlen); | 827 memset(out, 'A', outlen); |
828 return OK; | 828 return OK; |
829 } | 829 } |
830 | 830 |
831 ChannelIDService* MockClientSocket::GetChannelIDService() const { | 831 ChannelIDService* MockClientSocket::GetChannelIDService() const { |
832 NOTREACHED(); | 832 NOTREACHED(); |
833 return NULL; | 833 return NULL; |
834 } | 834 } |
835 | 835 |
836 Error MockClientSocket::GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, | 836 Error MockClientSocket::GetTokenBindingSignature(crypto::ECPrivateKey* key, |
837 std::vector<uint8_t>* out) { | 837 TokenBindingType tb_type, |
| 838 std::vector<uint8_t>* out) { |
838 NOTREACHED(); | 839 NOTREACHED(); |
839 return ERR_NOT_IMPLEMENTED; | 840 return ERR_NOT_IMPLEMENTED; |
840 } | 841 } |
841 | 842 |
842 crypto::ECPrivateKey* MockClientSocket::GetChannelIDKey() const { | 843 crypto::ECPrivateKey* MockClientSocket::GetChannelIDKey() const { |
843 NOTREACHED(); | 844 NOTREACHED(); |
844 return NULL; | 845 return NULL; |
845 } | 846 } |
846 | 847 |
847 MockClientSocket::~MockClientSocket() {} | 848 MockClientSocket::~MockClientSocket() {} |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1222 cert_request_info->client_certs = data_->cert_request_info->client_certs; | 1223 cert_request_info->client_certs = data_->cert_request_info->client_certs; |
1223 } else { | 1224 } else { |
1224 cert_request_info->Reset(); | 1225 cert_request_info->Reset(); |
1225 } | 1226 } |
1226 } | 1227 } |
1227 | 1228 |
1228 ChannelIDService* MockSSLClientSocket::GetChannelIDService() const { | 1229 ChannelIDService* MockSSLClientSocket::GetChannelIDService() const { |
1229 return data_->channel_id_service; | 1230 return data_->channel_id_service; |
1230 } | 1231 } |
1231 | 1232 |
1232 Error MockSSLClientSocket::GetSignedEKMForTokenBinding( | 1233 Error MockSSLClientSocket::GetTokenBindingSignature(crypto::ECPrivateKey* key, |
1233 crypto::ECPrivateKey* key, | 1234 TokenBindingType tb_type, |
1234 std::vector<uint8_t>* out) { | 1235 std::vector<uint8_t>* out) { |
1235 out->push_back('A'); | 1236 out->push_back('A'); |
1236 return OK; | 1237 return OK; |
1237 } | 1238 } |
1238 | 1239 |
1239 void MockSSLClientSocket::OnReadComplete(const MockRead& data) { | 1240 void MockSSLClientSocket::OnReadComplete(const MockRead& data) { |
1240 NOTIMPLEMENTED(); | 1241 NOTIMPLEMENTED(); |
1241 } | 1242 } |
1242 | 1243 |
1243 void MockSSLClientSocket::OnWriteComplete(int rv) { | 1244 void MockSSLClientSocket::OnWriteComplete(int rv) { |
1244 NOTIMPLEMENTED(); | 1245 NOTIMPLEMENTED(); |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1732 } | 1733 } |
1733 | 1734 |
1734 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size) { | 1735 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size) { |
1735 int64_t total = 0; | 1736 int64_t total = 0; |
1736 for (const MockWrite* write = writes; write != writes + writes_size; ++write) | 1737 for (const MockWrite* write = writes; write != writes + writes_size; ++write) |
1737 total += write->data_len; | 1738 total += write->data_len; |
1738 return total; | 1739 return total; |
1739 } | 1740 } |
1740 | 1741 |
1741 } // namespace net | 1742 } // namespace net |
OLD | NEW |