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

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

Issue 683113005: Update from chromium https://crrev.com/302282 (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
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 // Common utilities for Quic tests 5 // Common utilities for Quic tests
6 6
7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
9 9
10 #include <string> 10 #include <string>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 const int expected_len); 75 const int expected_len);
76 76
77 bool DecodeHexString(const base::StringPiece& hex, std::string* bytes); 77 bool DecodeHexString(const base::StringPiece& hex, std::string* bytes);
78 78
79 // Returns the length of a QuicPacket that is capable of holding either a 79 // Returns the length of a QuicPacket that is capable of holding either a
80 // stream frame or a minimal ack frame. Sets |*payload_length| to the number 80 // stream frame or a minimal ack frame. Sets |*payload_length| to the number
81 // of bytes of stream data that will fit in such a packet. 81 // of bytes of stream data that will fit in such a packet.
82 size_t GetPacketLengthForOneStream( 82 size_t GetPacketLengthForOneStream(
83 QuicVersion version, 83 QuicVersion version,
84 bool include_version, 84 bool include_version,
85 QuicConnectionIdLength connection_id_length,
85 QuicSequenceNumberLength sequence_number_length, 86 QuicSequenceNumberLength sequence_number_length,
86 InFecGroup is_in_fec_group, 87 InFecGroup is_in_fec_group,
87 size_t* payload_length); 88 size_t* payload_length);
88 89
89 // Returns QuicConfig set to default values. 90 // Returns QuicConfig set to default values.
90 QuicConfig DefaultQuicConfig(); 91 QuicConfig DefaultQuicConfig();
91 92
92 // Returns a version vector consisting of |version|. 93 // Returns a version vector consisting of |version|.
93 QuicVersionVector SupportedVersions(QuicVersion version); 94 QuicVersionVector SupportedVersions(QuicVersion version);
94 95
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 // clears the pointer to it to prevent use-after-free. 580 // clears the pointer to it to prevent use-after-free.
580 void Unregister(PerConnectionPacketWriter* writer); 581 void Unregister(PerConnectionPacketWriter* writer);
581 582
582 PerConnectionPacketWriter* current_writer_; 583 PerConnectionPacketWriter* current_writer_;
583 }; 584 };
584 585
585 } // namespace test 586 } // namespace test
586 } // namespace net 587 } // namespace net
587 588
588 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 589 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_sent_packet_manager_peer.cc ('k') | net/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698