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

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

Issue 125403006: Various QUIC cleanups to sync with internal code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comments Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/test_tools/quic_test_utils.h ('k') | no next file » | 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/test_tools/quic_test_utils.h" 5 #include "net/quic/test_tools/quic_test_utils.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "net/quic/crypto/crypto_framer.h" 9 #include "net/quic/crypto/crypto_framer.h"
10 #include "net/quic/crypto/crypto_handshake.h" 10 #include "net/quic/crypto/crypto_handshake.h"
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 if (stream_length < ack_length) { 504 if (stream_length < ack_length) {
505 *payload_length = 1 + ack_length - stream_length; 505 *payload_length = 1 + ack_length - stream_length;
506 } 506 }
507 507
508 return NullEncrypter().GetCiphertextSize(*payload_length) + 508 return NullEncrypter().GetCiphertextSize(*payload_length) +
509 QuicPacketCreator::StreamFramePacketOverhead( 509 QuicPacketCreator::StreamFramePacketOverhead(
510 version, PACKET_8BYTE_GUID, include_version, 510 version, PACKET_8BYTE_GUID, include_version,
511 sequence_number_length, is_in_fec_group); 511 sequence_number_length, is_in_fec_group);
512 } 512 }
513 513
514 // Size in bytes of the stream frame fields for an arbitrary StreamID and
515 // offset and the last frame in a packet.
516 size_t GetMinStreamFrameSize(QuicVersion version) {
517 return kQuicFrameTypeSize + kQuicMaxStreamIdSize + kQuicMaxStreamOffsetSize;
518 }
519
520 TestEntropyCalculator::TestEntropyCalculator() { } 514 TestEntropyCalculator::TestEntropyCalculator() { }
521 515
522 TestEntropyCalculator::~TestEntropyCalculator() { } 516 TestEntropyCalculator::~TestEntropyCalculator() { }
523 517
524 QuicPacketEntropyHash TestEntropyCalculator::EntropyHash( 518 QuicPacketEntropyHash TestEntropyCalculator::EntropyHash(
525 QuicPacketSequenceNumber sequence_number) const { 519 QuicPacketSequenceNumber sequence_number) const {
526 return 1u; 520 return 1u;
527 } 521 }
528 522
529 MockEntropyCalculator::MockEntropyCalculator() { } 523 MockEntropyCalculator::MockEntropyCalculator() { }
(...skipping 16 matching lines...) Expand all
546 data.AppendToString(&data_); 540 data.AppendToString(&data_);
547 return true; 541 return true;
548 } 542 }
549 543
550 void TestDecompressorVisitor::OnDecompressionError() { 544 void TestDecompressorVisitor::OnDecompressionError() {
551 error_ = true; 545 error_ = true;
552 } 546 }
553 547
554 } // namespace test 548 } // namespace test
555 } // namespace net 549 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698