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 "net/tools/flip_server/balsa_headers.h" | 7 #include "net/tools/flip_server/balsa_headers.h" |
8 #include "net/tools/quic/test_tools/http_message_test_utils.h" | 8 #include "net/tools/quic/test_tools/http_message_test_utils.h" |
9 | 9 |
10 using std::string; | 10 using std::string; |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 | 175 |
176 size_t QuicTestClient::bytes_read() const { | 176 size_t QuicTestClient::bytes_read() const { |
177 return bytes_read_; | 177 return bytes_read_; |
178 } | 178 } |
179 | 179 |
180 size_t QuicTestClient::bytes_written() const { | 180 size_t QuicTestClient::bytes_written() const { |
181 return bytes_written_; | 181 return bytes_written_; |
182 } | 182 } |
183 | 183 |
184 void QuicTestClient::OnClose(ReliableQuicStream* stream) { | 184 void QuicTestClient::OnClose(ReliableQuicStream* stream) { |
| 185 if (stream_ != stream) { |
| 186 return; |
| 187 } |
185 response_ = stream_->data(); | 188 response_ = stream_->data(); |
186 headers_.CopyFrom(stream_->headers()); | 189 headers_.CopyFrom(stream_->headers()); |
187 stream_error_ = stream_->stream_error(); | 190 stream_error_ = stream_->stream_error(); |
188 connection_error_ = stream_->connection_error(); | 191 connection_error_ = stream_->connection_error(); |
189 bytes_read_ = stream_->stream_bytes_read(); | 192 bytes_read_ = stream_->stream_bytes_read(); |
190 bytes_written_ = stream_->stream_bytes_written(); | 193 bytes_written_ = stream_->stream_bytes_written(); |
191 stream_ = NULL; | 194 stream_ = NULL; |
192 } | 195 } |
193 | 196 |
194 } // namespace test | 197 } // namespace test |
195 } // namespace tools | 198 } // namespace tools |
196 } // namespace net | 199 } // namespace net |
OLD | NEW |