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 <cstring> | 8 #include <cstring> |
9 #include <deque> | 9 #include <deque> |
10 #include <string> | 10 #include <string> |
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 // StreamSocket implementation. | 772 // StreamSocket implementation. |
773 int Connect(const CompletionCallback& callback) override = 0; | 773 int Connect(const CompletionCallback& callback) override = 0; |
774 void Disconnect() override; | 774 void Disconnect() override; |
775 bool IsConnected() const override; | 775 bool IsConnected() const override; |
776 bool IsConnectedAndIdle() const override; | 776 bool IsConnectedAndIdle() const override; |
777 int GetPeerAddress(IPEndPoint* address) const override; | 777 int GetPeerAddress(IPEndPoint* address) const override; |
778 int GetLocalAddress(IPEndPoint* address) const override; | 778 int GetLocalAddress(IPEndPoint* address) const override; |
779 const BoundNetLog& NetLog() const override; | 779 const BoundNetLog& NetLog() const override; |
780 void SetSubresourceSpeculation() override {} | 780 void SetSubresourceSpeculation() override {} |
781 void SetOmniboxSpeculation() override {} | 781 void SetOmniboxSpeculation() override {} |
| 782 void GetConnectionAttempts(ConnectionAttempts* out) const override; |
| 783 void ClearConnectionAttempts() override {} |
| 784 void AddConnectionAttempts(const ConnectionAttempts& attempts) override {} |
782 | 785 |
783 // SSLClientSocket implementation. | 786 // SSLClientSocket implementation. |
784 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override; | 787 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override; |
785 int ExportKeyingMaterial(const base::StringPiece& label, | 788 int ExportKeyingMaterial(const base::StringPiece& label, |
786 bool has_context, | 789 bool has_context, |
787 const base::StringPiece& context, | 790 const base::StringPiece& context, |
788 unsigned char* out, | 791 unsigned char* out, |
789 unsigned int outlen) override; | 792 unsigned int outlen) override; |
790 int GetTLSUniqueChannelBinding(std::string* out) override; | 793 int GetTLSUniqueChannelBinding(std::string* out) override; |
791 NextProtoStatus GetNextProto(std::string* proto) const override; | 794 NextProtoStatus GetNextProto(std::string* proto) const override; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 // StreamSocket implementation. | 837 // StreamSocket implementation. |
835 int Connect(const CompletionCallback& callback) override; | 838 int Connect(const CompletionCallback& callback) override; |
836 void Disconnect() override; | 839 void Disconnect() override; |
837 bool IsConnected() const override; | 840 bool IsConnected() const override; |
838 bool IsConnectedAndIdle() const override; | 841 bool IsConnectedAndIdle() const override; |
839 int GetPeerAddress(IPEndPoint* address) const override; | 842 int GetPeerAddress(IPEndPoint* address) const override; |
840 bool WasEverUsed() const override; | 843 bool WasEverUsed() const override; |
841 bool UsingTCPFastOpen() const override; | 844 bool UsingTCPFastOpen() const override; |
842 bool WasNpnNegotiated() const override; | 845 bool WasNpnNegotiated() const override; |
843 bool GetSSLInfo(SSLInfo* ssl_info) override; | 846 bool GetSSLInfo(SSLInfo* ssl_info) override; |
| 847 void GetConnectionAttempts(ConnectionAttempts* out) const override; |
| 848 void ClearConnectionAttempts() override; |
| 849 void AddConnectionAttempts(const ConnectionAttempts& attempts) override; |
844 | 850 |
845 // AsyncSocket: | 851 // AsyncSocket: |
846 void OnReadComplete(const MockRead& data) override; | 852 void OnReadComplete(const MockRead& data) override; |
847 void OnWriteComplete(int rv) override; | 853 void OnWriteComplete(int rv) override; |
848 void OnConnectComplete(const MockConnect& data) override; | 854 void OnConnectComplete(const MockConnect& data) override; |
849 | 855 |
850 private: | 856 private: |
851 int CompleteRead(); | 857 int CompleteRead(); |
852 | 858 |
853 AddressList addresses_; | 859 AddressList addresses_; |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1378 | 1384 |
1379 extern const char kSOCKS5OkRequest[]; | 1385 extern const char kSOCKS5OkRequest[]; |
1380 extern const int kSOCKS5OkRequestLength; | 1386 extern const int kSOCKS5OkRequestLength; |
1381 | 1387 |
1382 extern const char kSOCKS5OkResponse[]; | 1388 extern const char kSOCKS5OkResponse[]; |
1383 extern const int kSOCKS5OkResponseLength; | 1389 extern const int kSOCKS5OkResponseLength; |
1384 | 1390 |
1385 } // namespace net | 1391 } // namespace net |
1386 | 1392 |
1387 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ | 1393 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ |
OLD | NEW |