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 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 const SSLClientSocketContext& context) OVERRIDE; | 582 const SSLClientSocketContext& context) OVERRIDE; |
583 virtual void ClearSSLSessionCache() OVERRIDE; | 583 virtual void ClearSSLSessionCache() OVERRIDE; |
584 | 584 |
585 private: | 585 private: |
586 SocketDataProviderArray<SocketDataProvider> mock_data_; | 586 SocketDataProviderArray<SocketDataProvider> mock_data_; |
587 SocketDataProviderArray<SSLSocketDataProvider> mock_ssl_data_; | 587 SocketDataProviderArray<SSLSocketDataProvider> mock_ssl_data_; |
588 }; | 588 }; |
589 | 589 |
590 class MockClientSocket : public SSLClientSocket { | 590 class MockClientSocket : public SSLClientSocket { |
591 public: | 591 public: |
| 592 // Value returned by GetTLSUniqueChannelBinding(). |
| 593 static const char kTlsUnique[]; |
| 594 |
592 // TODO(ajwong): Why do we need net::NetLog? | 595 // TODO(ajwong): Why do we need net::NetLog? |
593 explicit MockClientSocket(net::NetLog* net_log); | 596 explicit MockClientSocket(net::NetLog* net_log); |
594 | 597 |
595 // Socket implementation. | 598 // Socket implementation. |
596 virtual int Read(IOBuffer* buf, int buf_len, | 599 virtual int Read(IOBuffer* buf, int buf_len, |
597 const CompletionCallback& callback) = 0; | 600 const CompletionCallback& callback) = 0; |
598 virtual int Write(IOBuffer* buf, int buf_len, | 601 virtual int Write(IOBuffer* buf, int buf_len, |
599 const CompletionCallback& callback) = 0; | 602 const CompletionCallback& callback) = 0; |
600 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; | 603 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; |
601 virtual bool SetSendBufferSize(int32 size) OVERRIDE; | 604 virtual bool SetSendBufferSize(int32 size) OVERRIDE; |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1068 | 1071 |
1069 extern const char kSOCKS5OkRequest[]; | 1072 extern const char kSOCKS5OkRequest[]; |
1070 extern const int kSOCKS5OkRequestLength; | 1073 extern const int kSOCKS5OkRequestLength; |
1071 | 1074 |
1072 extern const char kSOCKS5OkResponse[]; | 1075 extern const char kSOCKS5OkResponse[]; |
1073 extern const int kSOCKS5OkResponseLength; | 1076 extern const int kSOCKS5OkResponseLength; |
1074 | 1077 |
1075 } // namespace net | 1078 } // namespace net |
1076 | 1079 |
1077 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ | 1080 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ |
OLD | NEW |