| 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 #ifndef NET_SOCKET_SOCKET_TEST_UTIL_H_ | 5 #ifndef NET_SOCKET_SOCKET_TEST_UTIL_H_ |
| 6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_ | 6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 int buf_len, | 622 int buf_len, |
| 623 const CompletionCallback& callback) override; | 623 const CompletionCallback& callback) override; |
| 624 | 624 |
| 625 // StreamSocket implementation. | 625 // StreamSocket implementation. |
| 626 int Connect(const CompletionCallback& callback) override; | 626 int Connect(const CompletionCallback& callback) override; |
| 627 void Disconnect() override; | 627 void Disconnect() override; |
| 628 bool IsConnected() const override; | 628 bool IsConnected() const override; |
| 629 bool IsConnectedAndIdle() const override; | 629 bool IsConnectedAndIdle() const override; |
| 630 int GetPeerAddress(IPEndPoint* address) const override; | 630 int GetPeerAddress(IPEndPoint* address) const override; |
| 631 bool WasEverUsed() const override; | 631 bool WasEverUsed() const override; |
| 632 bool UsingTCPFastOpen() const override; | |
| 633 void EnableTCPFastOpenIfSupported() override; | 632 void EnableTCPFastOpenIfSupported() override; |
| 634 bool WasNpnNegotiated() const override; | 633 bool WasNpnNegotiated() const override; |
| 635 bool GetSSLInfo(SSLInfo* ssl_info) override; | 634 bool GetSSLInfo(SSLInfo* ssl_info) override; |
| 636 void GetConnectionAttempts(ConnectionAttempts* out) const override; | 635 void GetConnectionAttempts(ConnectionAttempts* out) const override; |
| 637 void ClearConnectionAttempts() override; | 636 void ClearConnectionAttempts() override; |
| 638 void AddConnectionAttempts(const ConnectionAttempts& attempts) override; | 637 void AddConnectionAttempts(const ConnectionAttempts& attempts) override; |
| 639 | 638 |
| 640 // AsyncSocket: | 639 // AsyncSocket: |
| 641 void OnReadComplete(const MockRead& data) override; | 640 void OnReadComplete(const MockRead& data) override; |
| 642 void OnWriteComplete(int rv) override; | 641 void OnWriteComplete(int rv) override; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 int Write(IOBuffer* buf, | 685 int Write(IOBuffer* buf, |
| 687 int buf_len, | 686 int buf_len, |
| 688 const CompletionCallback& callback) override; | 687 const CompletionCallback& callback) override; |
| 689 | 688 |
| 690 // StreamSocket implementation. | 689 // StreamSocket implementation. |
| 691 int Connect(const CompletionCallback& callback) override; | 690 int Connect(const CompletionCallback& callback) override; |
| 692 void Disconnect() override; | 691 void Disconnect() override; |
| 693 bool IsConnected() const override; | 692 bool IsConnected() const override; |
| 694 bool IsConnectedAndIdle() const override; | 693 bool IsConnectedAndIdle() const override; |
| 695 bool WasEverUsed() const override; | 694 bool WasEverUsed() const override; |
| 696 bool UsingTCPFastOpen() const override; | |
| 697 int GetPeerAddress(IPEndPoint* address) const override; | 695 int GetPeerAddress(IPEndPoint* address) const override; |
| 698 bool GetSSLInfo(SSLInfo* ssl_info) override; | 696 bool GetSSLInfo(SSLInfo* ssl_info) override; |
| 699 | 697 |
| 700 // SSLClientSocket implementation. | 698 // SSLClientSocket implementation. |
| 701 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override; | 699 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override; |
| 702 Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, | 700 Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, |
| 703 std::vector<uint8_t>* out) override; | 701 std::vector<uint8_t>* out) override; |
| 704 NextProtoStatus GetNextProto(std::string* proto) const override; | 702 NextProtoStatus GetNextProto(std::string* proto) const override; |
| 705 | 703 |
| 706 // This MockSocket does not implement the manual async IO feature. | 704 // This MockSocket does not implement the manual async IO feature. |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1003 | 1001 |
| 1004 // Helper function to get the total data size of the MockReads in |reads|. | 1002 // Helper function to get the total data size of the MockReads in |reads|. |
| 1005 int64_t CountReadBytes(const MockRead reads[], size_t reads_size); | 1003 int64_t CountReadBytes(const MockRead reads[], size_t reads_size); |
| 1006 | 1004 |
| 1007 // Helper function to get the total data size of the MockWrites in |writes|. | 1005 // Helper function to get the total data size of the MockWrites in |writes|. |
| 1008 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size); | 1006 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size); |
| 1009 | 1007 |
| 1010 } // namespace net | 1008 } // namespace net |
| 1011 | 1009 |
| 1012 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ | 1010 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ |
| OLD | NEW |