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

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

Issue 693943003: Update from https://crrev.com/302630 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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_flags.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/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "net/quic/quic_fec_group.h" 9 #include "net/quic/quic_fec_group.h"
10 #include "net/quic/quic_utils.h" 10 #include "net/quic/quic_utils.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 break; 77 break;
78 case PING_FRAME: 78 case PING_FRAME:
79 delete it->ping_frame; 79 delete it->ping_frame;
80 break; 80 break;
81 case NUM_FRAME_TYPES: 81 case NUM_FRAME_TYPES:
82 DCHECK(false) << "Cannot delete type: " << it->type; 82 DCHECK(false) << "Cannot delete type: " << it->type;
83 } 83 }
84 } 84 }
85 } 85 }
86 86
87 // NetworkChangeVisitor method.
88 void QuicPacketGenerator::OnCongestionWindowChange( 87 void QuicPacketGenerator::OnCongestionWindowChange(
89 QuicByteCount congestion_window) { 88 QuicByteCount congestion_window) {
90 packet_creator_.set_max_packets_per_fec_group( 89 packet_creator_.set_max_packets_per_fec_group(
91 static_cast<size_t>(kCongestionWindowMultiplierForFecGroupSize * 90 static_cast<size_t>(kCongestionWindowMultiplierForFecGroupSize *
92 congestion_window / kDefaultTCPMSS)); 91 congestion_window / kDefaultTCPMSS));
93 } 92 }
94 93
95 void QuicPacketGenerator::SetShouldSendAck(bool also_send_feedback, 94 void QuicPacketGenerator::SetShouldSendAck(bool also_send_feedback,
96 bool also_send_stop_waiting) { 95 bool also_send_stop_waiting) {
97 should_send_ack_ = true; 96 should_send_ack_ = true;
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 packet_creator_.set_connection_id_length(PACKET_8BYTE_CONNECTION_ID); 394 packet_creator_.set_connection_id_length(PACKET_8BYTE_CONNECTION_ID);
396 } 395 }
397 } 396 }
398 397
399 398
400 void QuicPacketGenerator::set_encryption_level(EncryptionLevel level) { 399 void QuicPacketGenerator::set_encryption_level(EncryptionLevel level) {
401 packet_creator_.set_encryption_level(level); 400 packet_creator_.set_encryption_level(level);
402 } 401 }
403 402
404 } // namespace net 403 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698