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

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

Issue 2565563002: Move various Chromium QUIC files to net/quic/chromium where they belong (Closed)
Patch Set: 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
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/chromium/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/chromium/quic_http_utils.h"
11 #include "net/quic/core/quic_framer.h" 12 #include "net/quic/core/quic_framer.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
17 namespace net { 16 namespace net {
18 namespace test { 17 namespace test {
19 18
20 QuicTestPacketMaker::QuicTestPacketMaker(QuicVersion version, 19 QuicTestPacketMaker::QuicTestPacketMaker(QuicVersion version,
21 QuicConnectionId connection_id, 20 QuicConnectionId connection_id,
22 MockClock* clock, 21 MockClock* clock,
23 const std::string& host, 22 const std::string& host,
24 Perspective perspective) 23 Perspective perspective)
25 : version_(version), 24 : version_(version),
26 connection_id_(connection_id), 25 connection_id_(connection_id),
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 settings_frame.AddSetting(id, false, false, value); 642 settings_frame.AddSetting(id, false, false, value);
644 SpdySerializedFrame spdy_frame( 643 SpdySerializedFrame spdy_frame(
645 spdy_request_framer_.SerializeFrame(settings_frame)); 644 spdy_request_framer_.SerializeFrame(settings_frame));
646 InitializeHeader(packet_number, should_include_version); 645 InitializeHeader(packet_number, should_include_version);
647 if (offset != nullptr) { 646 if (offset != nullptr) {
648 QuicStreamFrame quic_frame( 647 QuicStreamFrame quic_frame(
649 kHeadersStreamId, false, *offset, 648 kHeadersStreamId, false, *offset,
650 StringPiece(spdy_frame.data(), spdy_frame.size())); 649 StringPiece(spdy_frame.data(), spdy_frame.size()));
651 *offset += spdy_frame.size(); 650 *offset += spdy_frame.size();
652 return MakePacket(header_, QuicFrame(&quic_frame)); 651 return MakePacket(header_, QuicFrame(&quic_frame));
653 } else {
654 QuicStreamFrame quic_frame(
655 kHeadersStreamId, false, 0,
656 StringPiece(spdy_frame.data(), spdy_frame.size()));
657 LOG(INFO) << "quic_frame: " << quic_frame;
658 return MakePacket(header_, QuicFrame(&quic_frame));
659 } 652 }
653 QuicStreamFrame quic_frame(kHeadersStreamId, false, 0,
654 StringPiece(spdy_frame.data(), spdy_frame.size()));
655 return MakePacket(header_, QuicFrame(&quic_frame));
660 } 656 }
661 657
662 } // namespace test 658 } // namespace test
663 } // namespace net 659 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_test_packet_maker.h ('k') | net/quic/core/quic_crypto_client_stream_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698