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; |
11 using base::StringPiece; | 11 using base::StringPiece; |
12 | 12 |
13 namespace net { | 13 namespace net { |
| 14 namespace tools { |
14 namespace test { | 15 namespace test { |
15 | 16 |
16 BalsaHeaders* MungeHeaders(const BalsaHeaders* const_headers) { | 17 BalsaHeaders* MungeHeaders(const BalsaHeaders* const_headers) { |
17 StringPiece uri = const_headers->request_uri(); | 18 StringPiece uri = const_headers->request_uri(); |
18 if (uri.empty()) { | 19 if (uri.empty()) { |
19 return NULL; | 20 return NULL; |
20 } | 21 } |
21 if (const_headers->request_method() == "CONNECT") { | 22 if (const_headers->request_method() == "CONNECT") { |
22 return NULL; | 23 return NULL; |
23 } | 24 } |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 response_ = stream_->data(); | 172 response_ = stream_->data(); |
172 headers_.CopyFrom(stream_->headers()); | 173 headers_.CopyFrom(stream_->headers()); |
173 stream_error_ = stream_->stream_error(); | 174 stream_error_ = stream_->stream_error(); |
174 connection_error_ = stream_->connection_error(); | 175 connection_error_ = stream_->connection_error(); |
175 bytes_read_ = stream_->stream_bytes_read(); | 176 bytes_read_ = stream_->stream_bytes_read(); |
176 bytes_written_ = stream_->stream_bytes_written(); | 177 bytes_written_ = stream_->stream_bytes_written(); |
177 stream_ = NULL; | 178 stream_ = NULL; |
178 } | 179 } |
179 | 180 |
180 } // namespace test | 181 } // namespace test |
| 182 } // namespace tools |
181 } // namespace net | 183 } // namespace net |
OLD | NEW |