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

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

Issue 1357953002: Replace the existing SpdyHeaderBlock typedef with a class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add NET_EXPORT to fix compile error on win_chromium_compile_dbg_ng. Created 5 years, 2 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 | « net/quic/spdy_utils.cc ('k') | net/spdy/hpack/hpack_decoder.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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 return MakeResponseHeadersPacket( 253 return MakeResponseHeadersPacket(
254 packet_number, stream_id, should_include_version, fin, headers, nullptr); 254 packet_number, stream_id, should_include_version, fin, headers, nullptr);
255 } 255 }
256 256
257 SpdyHeaderBlock QuicTestPacketMaker::GetRequestHeaders( 257 SpdyHeaderBlock QuicTestPacketMaker::GetRequestHeaders(
258 const std::string& method, 258 const std::string& method,
259 const std::string& scheme, 259 const std::string& scheme,
260 const std::string& path) { 260 const std::string& path) {
261 SpdyHeaderBlock headers; 261 SpdyHeaderBlock headers;
262 if (version_ <= QUIC_VERSION_24) { 262 if (version_ <= QUIC_VERSION_24) {
263 headers[":version"] = "HTTP/1.1";
264 }
265 headers[":method"] = method;
266 if (version_ <= QUIC_VERSION_24) {
263 headers[":host"] = host_; 267 headers[":host"] = host_;
264 } else { 268 } else {
265 headers[":authority"] = host_; 269 headers[":authority"] = host_;
266 } 270 }
271 headers[":scheme"] = scheme;
267 headers[":path"] = path; 272 headers[":path"] = path;
268 headers[":scheme"] = scheme;
269 headers[":method"] = method;
270 if (version_ <= QUIC_VERSION_24) {
271 headers[":version"] = "HTTP/1.1";
272 }
273 return headers; 273 return headers;
274 } 274 }
275 275
276 SpdyHeaderBlock QuicTestPacketMaker::GetResponseHeaders( 276 SpdyHeaderBlock QuicTestPacketMaker::GetResponseHeaders(
277 const std::string& status) { 277 const std::string& status) {
278 SpdyHeaderBlock headers; 278 SpdyHeaderBlock headers;
279 headers[":status"] = status; 279 headers[":status"] = status;
280 if (version_ <= QUIC_VERSION_24) { 280 if (version_ <= QUIC_VERSION_24) {
281 headers[":version"] = "HTTP/1.1"; 281 headers[":version"] = "HTTP/1.1";
282 } 282 }
(...skipping 25 matching lines...) Expand all
308 header_.public_header.version_flag = should_include_version; 308 header_.public_header.version_flag = should_include_version;
309 header_.public_header.packet_number_length = PACKET_1BYTE_PACKET_NUMBER; 309 header_.public_header.packet_number_length = PACKET_1BYTE_PACKET_NUMBER;
310 header_.packet_packet_number = packet_number; 310 header_.packet_packet_number = packet_number;
311 header_.fec_group = 0; 311 header_.fec_group = 0;
312 header_.entropy_flag = false; 312 header_.entropy_flag = false;
313 header_.fec_flag = false; 313 header_.fec_flag = false;
314 } 314 }
315 315
316 } // namespace test 316 } // namespace test
317 } // namespace net 317 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/spdy_utils.cc ('k') | net/spdy/hpack/hpack_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698