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

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

Issue 2544813002: Remove enum SpdyMajorVersion. (Closed)
Patch Set: Merge comment changes from 140661724. Created 4 years 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/core/spdy_utils.cc ('k') | net/spdy/buffered_spdy_framer.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 #include <utility> 8 #include <utility>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "net/quic/core/quic_framer.h" 11 #include "net/quic/core/quic_framer.h"
12 #include "net/quic/core/quic_http_utils.h" 12 #include "net/quic/core/quic_http_utils.h"
13 #include "net/quic/core/quic_utils.h" 13 #include "net/quic/core/quic_utils.h"
14 #include "net/quic/test_tools/quic_test_utils.h" 14 #include "net/quic/test_tools/quic_test_utils.h"
15 15
16 using std::make_pair; 16 using std::make_pair;
17 17
18 namespace net { 18 namespace net {
19 namespace test { 19 namespace test {
20 20
21 QuicTestPacketMaker::QuicTestPacketMaker(QuicVersion version, 21 QuicTestPacketMaker::QuicTestPacketMaker(QuicVersion version,
22 QuicConnectionId connection_id, 22 QuicConnectionId connection_id,
23 MockClock* clock, 23 MockClock* clock,
24 const std::string& host, 24 const std::string& host,
25 Perspective perspective) 25 Perspective perspective)
26 : version_(version), 26 : version_(version),
27 connection_id_(connection_id), 27 connection_id_(connection_id),
28 clock_(clock), 28 clock_(clock),
29 host_(host), 29 host_(host),
30 spdy_request_framer_(HTTP2),
31 spdy_response_framer_(HTTP2),
32 perspective_(perspective) {} 30 perspective_(perspective) {}
33 31
34 QuicTestPacketMaker::~QuicTestPacketMaker() {} 32 QuicTestPacketMaker::~QuicTestPacketMaker() {}
35 33
36 void QuicTestPacketMaker::set_hostname(const std::string& host) { 34 void QuicTestPacketMaker::set_hostname(const std::string& host) {
37 host_.assign(host); 35 host_.assign(host);
38 } 36 }
39 37
40 std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakePingPacket( 38 std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakePingPacket(
41 QuicPacketNumber num, 39 QuicPacketNumber num,
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 bool should_include_version) { 624 bool should_include_version) {
627 header_.public_header.connection_id = connection_id_; 625 header_.public_header.connection_id = connection_id_;
628 header_.public_header.reset_flag = false; 626 header_.public_header.reset_flag = false;
629 header_.public_header.version_flag = should_include_version; 627 header_.public_header.version_flag = should_include_version;
630 header_.public_header.packet_number_length = PACKET_1BYTE_PACKET_NUMBER; 628 header_.public_header.packet_number_length = PACKET_1BYTE_PACKET_NUMBER;
631 header_.packet_number = packet_number; 629 header_.packet_number = packet_number;
632 } 630 }
633 631
634 } // namespace test 632 } // namespace test
635 } // namespace net 633 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/spdy_utils.cc ('k') | net/spdy/buffered_spdy_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698