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/test_tools/quic_test_utils.cc

Issue 22311013: Removing QUIC's VERSION_6, now that QUIC no longer needs to support the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Sync with trunk Created 7 years, 4 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/quic_protocol.cc ('k') | net/tools/quic/end_to_end_test.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/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 "net/quic/crypto/crypto_framer.h" 8 #include "net/quic/crypto/crypto_framer.h"
9 #include "net/quic/crypto/crypto_handshake.h" 9 #include "net/quic/crypto/crypto_handshake.h"
10 #include "net/quic/crypto/crypto_utils.h" 10 #include "net/quic/crypto/crypto_utils.h"
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 if (stream_length < ack_length) { 416 if (stream_length < ack_length) {
417 *payload_length = 1 + ack_length - stream_length; 417 *payload_length = 1 + ack_length - stream_length;
418 } 418 }
419 419
420 return NullEncrypter().GetCiphertextSize(*payload_length) + 420 return NullEncrypter().GetCiphertextSize(*payload_length) +
421 QuicPacketCreator::StreamFramePacketOverhead( 421 QuicPacketCreator::StreamFramePacketOverhead(
422 version, PACKET_8BYTE_GUID, include_version, 422 version, PACKET_8BYTE_GUID, include_version,
423 PACKET_6BYTE_SEQUENCE_NUMBER, is_in_fec_group); 423 PACKET_6BYTE_SEQUENCE_NUMBER, is_in_fec_group);
424 } 424 }
425 425
426 // Size in bytes of the stream frame fields for an arbitrary StreamID and
427 // offset and the last frame in a packet.
426 size_t GetMinStreamFrameSize(QuicVersion version) { 428 size_t GetMinStreamFrameSize(QuicVersion version) {
427 return kQuicFrameTypeSize + kQuicMaxStreamIdSize + kQuicMaxStreamOffsetSize + 429 return kQuicFrameTypeSize + kQuicMaxStreamIdSize + kQuicMaxStreamOffsetSize;
428 (version == QUIC_VERSION_6 ?
429 (kQuicStreamFinSize + kQuicStreamPayloadLengthSize) : 0);
430 } 430 }
431 431
432 QuicPacketEntropyHash TestEntropyCalculator::EntropyHash( 432 QuicPacketEntropyHash TestEntropyCalculator::EntropyHash(
433 QuicPacketSequenceNumber sequence_number) const { 433 QuicPacketSequenceNumber sequence_number) const {
434 return 1u; 434 return 1u;
435 } 435 }
436 436
437 QuicConfig DefaultQuicConfig() { 437 QuicConfig DefaultQuicConfig() {
438 QuicConfig config; 438 QuicConfig config;
439 config.SetDefaults(); 439 config.SetDefaults();
440 return config; 440 return config;
441 } 441 }
442 442
443 bool TestDecompressorVisitor::OnDecompressedData(StringPiece data) { 443 bool TestDecompressorVisitor::OnDecompressedData(StringPiece data) {
444 data.AppendToString(&data_); 444 data.AppendToString(&data_);
445 return true; 445 return true;
446 } 446 }
447 447
448 void TestDecompressorVisitor::OnDecompressionError() { 448 void TestDecompressorVisitor::OnDecompressionError() {
449 error_ = true; 449 error_ = true;
450 } 450 }
451 451
452 } // namespace test 452 } // namespace test
453 } // namespace net 453 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_protocol.cc ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698