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

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

Issue 2566783002: Various formatting cleanups to net/quic/crypto and net/quic/congestion_control (Closed)
Patch Set: Rebase Created 3 years, 12 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/crypto/strike_register.h ('k') | net/quic/test_tools/quic_test_utils.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 // 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 <stddef.h> 10 #include <stddef.h>
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 QuicPacketNumberLength packet_number_length, 160 QuicPacketNumberLength packet_number_length,
161 QuicVersionVector* versions, 161 QuicVersionVector* versions,
162 Perspective perspective); 162 Perspective perspective);
163 163
164 void CompareCharArraysWithHexError(const std::string& description, 164 void CompareCharArraysWithHexError(const std::string& description,
165 const char* actual, 165 const char* actual,
166 const int actual_len, 166 const int actual_len,
167 const char* expected, 167 const char* expected,
168 const int expected_len); 168 const int expected_len);
169 169
170 bool DecodeHexString(const StringPiece& hex, std::string* bytes);
171
172 // Returns the length of a QuicPacket that is capable of holding either a 170 // Returns the length of a QuicPacket that is capable of holding either a
173 // stream frame or a minimal ack frame. Sets |*payload_length| to the number 171 // stream frame or a minimal ack frame. Sets |*payload_length| to the number
174 // of bytes of stream data that will fit in such a packet. 172 // of bytes of stream data that will fit in such a packet.
175 size_t GetPacketLengthForOneStream(QuicVersion version, 173 size_t GetPacketLengthForOneStream(QuicVersion version,
176 bool include_version, 174 bool include_version,
177 bool include_path_id, 175 bool include_path_id,
178 bool include_diversification_nonce, 176 bool include_diversification_nonce,
179 QuicConnectionIdLength connection_id_length, 177 QuicConnectionIdLength connection_id_length,
180 QuicPacketNumberLength packet_number_length, 178 QuicPacketNumberLength packet_number_length,
181 size_t* payload_length); 179 size_t* payload_length);
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 iov->iov_base = const_cast<char*>(str.data()); 1058 iov->iov_base = const_cast<char*>(str.data());
1061 iov->iov_len = static_cast<size_t>(str.size()); 1059 iov->iov_len = static_cast<size_t>(str.size());
1062 QuicIOVector quic_iov(iov, 1, str.size()); 1060 QuicIOVector quic_iov(iov, 1, str.size());
1063 return quic_iov; 1061 return quic_iov;
1064 } 1062 }
1065 1063
1066 } // namespace test 1064 } // namespace test
1067 } // namespace net 1065 } // namespace net
1068 1066
1069 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 1067 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/core/crypto/strike_register.h ('k') | net/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698