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

Side by Side Diff: net/quic/core/quic_packet_creator.cc

Issue 2867693004: Snapshot of all changes to get jumbo in blink and content.
Patch Set: Exclude certain files from jumbo because of a Windows problem Created 3 years, 3 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/core/quic_framer.cc ('k') | net/quic/core/quic_sent_packet_manager.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 (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/core/quic_packet_creator.h" 5 #include "net/quic/core/quic_packet_creator.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstdint> 8 #include <cstdint>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 } 613 }
614 614
615 bool QuicPacketCreator::IncludeNonceInPublicHeader() { 615 bool QuicPacketCreator::IncludeNonceInPublicHeader() {
616 return have_diversification_nonce_ && 616 return have_diversification_nonce_ &&
617 packet_.encryption_level == ENCRYPTION_INITIAL; 617 packet_.encryption_level == ENCRYPTION_INITIAL;
618 } 618 }
619 619
620 void QuicPacketCreator::AddPendingPadding(QuicByteCount size) { 620 void QuicPacketCreator::AddPendingPadding(QuicByteCount size) {
621 pending_padding_bytes_ += size; 621 pending_padding_bytes_ += size;
622 } 622 }
623 #undef ENDPOINT
623 624
624 bool QuicPacketCreator::StreamFrameStartsWithChlo( 625 bool QuicPacketCreator::StreamFrameStartsWithChlo(
625 QuicIOVector iov, 626 QuicIOVector iov,
626 size_t iov_offset, 627 size_t iov_offset,
627 const QuicStreamFrame& frame) const { 628 const QuicStreamFrame& frame) const {
628 if (!framer_->HasDataProducer()) { 629 if (!framer_->HasDataProducer()) {
629 return frame.stream_id == kCryptoStreamId && 630 return frame.stream_id == kCryptoStreamId &&
630 frame.data_length >= sizeof(kCHLO) && 631 frame.data_length >= sizeof(kCHLO) &&
631 strncmp(frame.data_buffer, reinterpret_cast<const char*>(&kCHLO), 632 strncmp(frame.data_buffer, reinterpret_cast<const char*>(&kCHLO),
632 sizeof(kCHLO)) == 0; 633 sizeof(kCHLO)) == 0;
633 } 634 }
634 635
635 if (framer_->perspective() == Perspective::IS_SERVER || 636 if (framer_->perspective() == Perspective::IS_SERVER ||
636 frame.stream_id != kCryptoStreamId || frame.data_length < sizeof(kCHLO)) { 637 frame.stream_id != kCryptoStreamId || frame.data_length < sizeof(kCHLO)) {
637 return false; 638 return false;
638 } 639 }
639 return framer_->StartsWithChlo(frame.stream_id, frame.offset); 640 return framer_->StartsWithChlo(frame.stream_id, frame.offset);
640 } 641 }
641 642
642 } // namespace net 643 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_framer.cc ('k') | net/quic/core/quic_sent_packet_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698