| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <cstring> | 9 #include <cstring> |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 net::SSLSocketDataProvider* data_; | 676 net::SSLSocketDataProvider* data_; |
| 677 bool is_npn_state_set_; | 677 bool is_npn_state_set_; |
| 678 bool new_npn_value_; | 678 bool new_npn_value_; |
| 679 bool was_used_to_convey_data_; | 679 bool was_used_to_convey_data_; |
| 680 }; | 680 }; |
| 681 | 681 |
| 682 class TestSocketRequest : public CallbackRunner< Tuple1<int> > { | 682 class TestSocketRequest : public CallbackRunner< Tuple1<int> > { |
| 683 public: | 683 public: |
| 684 TestSocketRequest( | 684 TestSocketRequest( |
| 685 std::vector<TestSocketRequest*>* request_order, | 685 std::vector<TestSocketRequest*>* request_order, |
| 686 size_t* completion_count) | 686 size_t* completion_count); |
| 687 : request_order_(request_order), | 687 virtual ~TestSocketRequest(); |
| 688 completion_count_(completion_count) { | |
| 689 DCHECK(request_order); | |
| 690 DCHECK(completion_count); | |
| 691 } | |
| 692 | 688 |
| 693 ClientSocketHandle* handle() { return &handle_; } | 689 ClientSocketHandle* handle() { return &handle_; } |
| 694 | 690 |
| 695 int WaitForResult(); | 691 int WaitForResult(); |
| 696 virtual void RunWithParams(const Tuple1<int>& params); | 692 virtual void RunWithParams(const Tuple1<int>& params); |
| 697 | 693 |
| 698 private: | 694 private: |
| 699 ClientSocketHandle handle_; | 695 ClientSocketHandle handle_; |
| 700 std::vector<TestSocketRequest*>* request_order_; | 696 std::vector<TestSocketRequest*>* request_order_; |
| 701 size_t* completion_count_; | 697 size_t* completion_count_; |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 937 int cancel_count_; | 933 int cancel_count_; |
| 938 ScopedVector<MockConnectJob> job_list_; | 934 ScopedVector<MockConnectJob> job_list_; |
| 939 | 935 |
| 940 DISALLOW_COPY_AND_ASSIGN(MockSSLClientSocketPool); | 936 DISALLOW_COPY_AND_ASSIGN(MockSSLClientSocketPool); |
| 941 }; | 937 }; |
| 942 | 938 |
| 943 | 939 |
| 944 } // namespace net | 940 } // namespace net |
| 945 | 941 |
| 946 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ | 942 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ |
| OLD | NEW |