Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: net/quic/test_tools/quic_test_packet_maker.cc

Issue 1281463002: Preparation for changing SpdyHeaderBlock to be ordered. This just (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Close_QUIC_connections_99369742
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | net/tools/quic/spdy_balsa_utils_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/quic/test_tools/quic_test_packet_maker.h" 5 #include "net/quic/test_tools/quic_test_packet_maker.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "net/quic/quic_framer.h" 9 #include "net/quic/quic_framer.h"
10 #include "net/quic/quic_http_utils.h" 10 #include "net/quic/quic_http_utils.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 kHeadersStreamId, false, 0, 223 kHeadersStreamId, false, 0,
224 base::StringPiece(spdy_frame->data(), spdy_frame->size())); 224 base::StringPiece(spdy_frame->data(), spdy_frame->size()));
225 return MakePacket(header_, QuicFrame(&frame)); 225 return MakePacket(header_, QuicFrame(&frame));
226 } 226 }
227 227
228 SpdyHeaderBlock QuicTestPacketMaker::GetRequestHeaders( 228 SpdyHeaderBlock QuicTestPacketMaker::GetRequestHeaders(
229 const std::string& method, 229 const std::string& method,
230 const std::string& scheme, 230 const std::string& scheme,
231 const std::string& path) { 231 const std::string& path) {
232 SpdyHeaderBlock headers; 232 SpdyHeaderBlock headers;
233 headers[":method"] = method;
234 if (version_ <= QUIC_VERSION_24) { 233 if (version_ <= QUIC_VERSION_24) {
235 headers[":host"] = host_; 234 headers[":host"] = host_;
236 } else { 235 } else {
237 headers[":authority"] = host_; 236 headers[":authority"] = host_;
238 } 237 }
239 headers[":path"] = path; 238 headers[":path"] = path;
240 headers[":scheme"] = scheme; 239 headers[":scheme"] = scheme;
240 headers[":method"] = method;
241 if (version_ <= QUIC_VERSION_24) { 241 if (version_ <= QUIC_VERSION_24) {
242 headers[":version"] = "HTTP/1.1"; 242 headers[":version"] = "HTTP/1.1";
243 } 243 }
244 return headers; 244 return headers;
245 } 245 }
246 246
247 SpdyHeaderBlock QuicTestPacketMaker::GetResponseHeaders( 247 SpdyHeaderBlock QuicTestPacketMaker::GetResponseHeaders(
248 const std::string& status) { 248 const std::string& status) {
249 SpdyHeaderBlock headers; 249 SpdyHeaderBlock headers;
250 headers[":status"] = status; 250 headers[":status"] = status;
(...skipping 29 matching lines...) Expand all
280 header_.public_header.version_flag = should_include_version; 280 header_.public_header.version_flag = should_include_version;
281 header_.public_header.sequence_number_length = PACKET_1BYTE_SEQUENCE_NUMBER; 281 header_.public_header.sequence_number_length = PACKET_1BYTE_SEQUENCE_NUMBER;
282 header_.packet_sequence_number = sequence_number; 282 header_.packet_sequence_number = sequence_number;
283 header_.fec_group = 0; 283 header_.fec_group = 0;
284 header_.entropy_flag = false; 284 header_.entropy_flag = false;
285 header_.fec_flag = false; 285 header_.fec_flag = false;
286 } 286 }
287 287
288 } // namespace test 288 } // namespace test
289 } // namespace net 289 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/tools/quic/spdy_balsa_utils_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698