| 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 | 342 |
| 343 StaticSocketDataHelper helper_; | 343 StaticSocketDataHelper helper_; |
| 344 | 344 |
| 345 DISALLOW_COPY_AND_ASSIGN(StaticSocketDataProvider); | 345 DISALLOW_COPY_AND_ASSIGN(StaticSocketDataProvider); |
| 346 }; | 346 }; |
| 347 | 347 |
| 348 // SSLSocketDataProviders only need to keep track of the return code from calls | 348 // SSLSocketDataProviders only need to keep track of the return code from calls |
| 349 // to Connect(). | 349 // to Connect(). |
| 350 struct SSLSocketDataProvider { | 350 struct SSLSocketDataProvider { |
| 351 SSLSocketDataProvider(IoMode mode, int result); | 351 SSLSocketDataProvider(IoMode mode, int result); |
| 352 SSLSocketDataProvider(const SSLSocketDataProvider& other); |
| 352 ~SSLSocketDataProvider(); | 353 ~SSLSocketDataProvider(); |
| 353 | 354 |
| 354 void SetNextProto(NextProto proto); | 355 void SetNextProto(NextProto proto); |
| 355 | 356 |
| 356 MockConnect connect; | 357 MockConnect connect; |
| 357 SSLClientSocket::NextProtoStatus next_proto_status; | 358 SSLClientSocket::NextProtoStatus next_proto_status; |
| 358 std::string next_proto; | 359 std::string next_proto; |
| 359 NextProtoVector next_protos_expected_in_ssl_config; | 360 NextProtoVector next_protos_expected_in_ssl_config; |
| 360 bool client_cert_sent; | 361 bool client_cert_sent; |
| 361 SSLCertRequestInfo* cert_request_info; | 362 SSLCertRequestInfo* cert_request_info; |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1001 | 1002 |
| 1002 // Helper function to get the total data size of the MockReads in |reads|. | 1003 // Helper function to get the total data size of the MockReads in |reads|. |
| 1003 int64_t CountReadBytes(const MockRead reads[], size_t reads_size); | 1004 int64_t CountReadBytes(const MockRead reads[], size_t reads_size); |
| 1004 | 1005 |
| 1005 // Helper function to get the total data size of the MockWrites in |writes|. | 1006 // Helper function to get the total data size of the MockWrites in |writes|. |
| 1006 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size); | 1007 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size); |
| 1007 | 1008 |
| 1008 } // namespace net | 1009 } // namespace net |
| 1009 | 1010 |
| 1010 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ | 1011 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ |
| OLD | NEW |