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 #include "net/tools/quic/test_tools/quic_test_client.h" | 5 #include "net/tools/quic/test_tools/quic_test_client.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 allow_bidirectional_data_(false) { | 236 allow_bidirectional_data_(false) { |
237 Initialize(); | 237 Initialize(); |
238 } | 238 } |
239 | 239 |
240 QuicTestClient::QuicTestClient() : allow_bidirectional_data_(false) {} | 240 QuicTestClient::QuicTestClient() : allow_bidirectional_data_(false) {} |
241 | 241 |
242 QuicTestClient::~QuicTestClient() { | 242 QuicTestClient::~QuicTestClient() { |
243 for (std::pair<QuicStreamId, QuicSpdyClientStream*> stream : open_streams_) { | 243 for (std::pair<QuicStreamId, QuicSpdyClientStream*> stream : open_streams_) { |
244 stream.second->set_visitor(nullptr); | 244 stream.second->set_visitor(nullptr); |
245 } | 245 } |
246 client_->Disconnect(); | |
247 } | 246 } |
248 | 247 |
249 void QuicTestClient::Initialize() { | 248 void QuicTestClient::Initialize() { |
250 priority_ = 3; | 249 priority_ = 3; |
251 connect_attempted_ = false; | 250 connect_attempted_ = false; |
252 auto_reconnect_ = false; | 251 auto_reconnect_ = false; |
253 buffer_body_ = true; | 252 buffer_body_ = true; |
254 num_requests_ = 0; | 253 num_requests_ = 0; |
255 num_responses_ = 0; | 254 num_responses_ = 0; |
256 ClearPerConnectionState(); | 255 ClearPerConnectionState(); |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 | 791 |
793 void QuicTestClient::ClearPerConnectionState() { | 792 void QuicTestClient::ClearPerConnectionState() { |
794 ClearPerRequestState(); | 793 ClearPerRequestState(); |
795 open_streams_.clear(); | 794 open_streams_.clear(); |
796 closed_stream_states_.clear(); | 795 closed_stream_states_.clear(); |
797 latest_created_stream_ = nullptr; | 796 latest_created_stream_ = nullptr; |
798 } | 797 } |
799 | 798 |
800 } // namespace test | 799 } // namespace test |
801 } // namespace net | 800 } // namespace net |
OLD | NEW |