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

Side by Side Diff: net/quic/quic_packet_generator.cc

Issue 1983183002: Landing Recent QUIC changes until 5/14/2016 02:25:25 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: "first try to fix link error for win_clang build" Created 4 years, 7 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/quic_headers_stream_test.cc ('k') | net/quic/quic_protocol.h » ('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 (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/quic/quic_packet_generator.h" 5 #include "net/quic/quic_packet_generator.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/quic/quic_bug_tracker.h" 8 #include "net/quic/quic_bug_tracker.h"
9 #include "net/quic/quic_flags.h" 9 #include "net/quic/quic_flags.h"
10 #include "net/quic/quic_utils.h" 10 #include "net/quic/quic_utils.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 queued_control_frames_.push_back(frame); 52 queued_control_frames_.push_back(frame);
53 SendQueuedFrames(/*flush=*/false); 53 SendQueuedFrames(/*flush=*/false);
54 } 54 }
55 55
56 QuicConsumedData QuicPacketGenerator::ConsumeData( 56 QuicConsumedData QuicPacketGenerator::ConsumeData(
57 QuicStreamId id, 57 QuicStreamId id,
58 QuicIOVector iov, 58 QuicIOVector iov,
59 QuicStreamOffset offset, 59 QuicStreamOffset offset,
60 bool fin, 60 bool fin,
61 QuicAckListenerInterface* listener) { 61 QuicAckListenerInterface* listener) {
62 bool has_handshake = id == kCryptoStreamId; 62 bool has_handshake = (id == kCryptoStreamId);
63 QUIC_BUG_IF(has_handshake && fin)
64 << "Handshake packets should never send a fin";
63 // To make reasoning about crypto frames easier, we don't combine them with 65 // To make reasoning about crypto frames easier, we don't combine them with
64 // other retransmittable frames in a single packet. 66 // other retransmittable frames in a single packet.
65 const bool flush = 67 const bool flush =
66 has_handshake && packet_creator_.HasPendingRetransmittableFrames(); 68 has_handshake && packet_creator_.HasPendingRetransmittableFrames();
67 SendQueuedFrames(flush); 69 SendQueuedFrames(flush);
68 70
69 size_t total_bytes_consumed = 0; 71 size_t total_bytes_consumed = 0;
70 bool fin_consumed = false; 72 bool fin_consumed = false;
71 73
72 if (!packet_creator_.HasRoomForStreamFrame(id, offset)) { 74 if (!packet_creator_.HasRoomForStreamFrame(id, offset)) {
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 296
295 void QuicPacketGenerator::SetCurrentPath( 297 void QuicPacketGenerator::SetCurrentPath(
296 QuicPathId path_id, 298 QuicPathId path_id,
297 QuicPacketNumber least_packet_awaited_by_peer, 299 QuicPacketNumber least_packet_awaited_by_peer,
298 QuicPacketCount max_packets_in_flight) { 300 QuicPacketCount max_packets_in_flight) {
299 packet_creator_.SetCurrentPath(path_id, least_packet_awaited_by_peer, 301 packet_creator_.SetCurrentPath(path_id, least_packet_awaited_by_peer,
300 max_packets_in_flight); 302 max_packets_in_flight);
301 } 303 }
302 304
303 } // namespace net 305 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_headers_stream_test.cc ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698