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

Side by Side Diff: net/quic/core/quic_utils.h

Issue 2517513004: Move QUIC error code utility methods to quic_error_codes.{h,cc}, and rename them slightly. No beha… (Closed)
Patch Set: Created 4 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
« no previous file with comments | « net/quic/core/quic_stream_sequencer.cc ('k') | net/quic/core/quic_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 // Some helpers for quic. 5 // Some helpers for quic.
6 6
7 #ifndef NET_QUIC_CORE_QUIC_UTILS_H_ 7 #ifndef NET_QUIC_CORE_QUIC_UTILS_H_
8 #define NET_QUIC_CORE_QUIC_UTILS_H_ 8 #define NET_QUIC_CORE_QUIC_UTILS_H_
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // http://www.isthe.com/chongo/tech/comp/fnv/index.html#FNV-param 44 // http://www.isthe.com/chongo/tech/comp/fnv/index.html#FNV-param
45 static uint128 FNV1a_128_Hash_Two(const char* data1, 45 static uint128 FNV1a_128_Hash_Two(const char* data1,
46 int len1, 46 int len1,
47 const char* data2, 47 const char* data2,
48 int len2); 48 int len2);
49 49
50 // SerializeUint128 writes the first 96 bits of |v| in little-endian form 50 // SerializeUint128 writes the first 96 bits of |v| in little-endian form
51 // to |out|. 51 // to |out|.
52 static void SerializeUint128Short(uint128 v, uint8_t* out); 52 static void SerializeUint128Short(uint128 v, uint8_t* out);
53 53
54 // Returns the name of the QuicRstStreamErrorCode as a char*
55 static const char* StreamErrorToString(QuicRstStreamErrorCode error);
56
57 // Returns the name of the QuicErrorCode as a char*
58 static const char* ErrorToString(QuicErrorCode error);
59
60 // Returns the level of encryption as a char* 54 // Returns the level of encryption as a char*
61 static const char* EncryptionLevelToString(EncryptionLevel level); 55 static const char* EncryptionLevelToString(EncryptionLevel level);
62 56
63 // Returns TransmissionType as a char* 57 // Returns TransmissionType as a char*
64 static const char* TransmissionTypeToString(TransmissionType type); 58 static const char* TransmissionTypeToString(TransmissionType type);
65 59
66 // Returns the list of QUIC tags represented by the comma separated 60 // Returns the list of QUIC tags represented by the comma separated
67 // string in |connection_options|. 61 // string in |connection_options|.
68 static QuicTagVector ParseQuicConnectionOptions( 62 static QuicTagVector ParseQuicConnectionOptions(
69 const std::string& connection_options); 63 const std::string& connection_options);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // "0x0000: 4865 6c6c 6f2c 2051 5549 4321 0102 0304 Hello,.QUIC!...." 105 // "0x0000: 4865 6c6c 6f2c 2051 5549 4321 0102 0304 Hello,.QUIC!...."
112 static std::string HexDump(base::StringPiece binary_data); 106 static std::string HexDump(base::StringPiece binary_data);
113 107
114 private: 108 private:
115 DISALLOW_COPY_AND_ASSIGN(QuicUtils); 109 DISALLOW_COPY_AND_ASSIGN(QuicUtils);
116 }; 110 };
117 111
118 } // namespace net 112 } // namespace net
119 113
120 #endif // NET_QUIC_CORE_QUIC_UTILS_H_ 114 #endif // NET_QUIC_CORE_QUIC_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_stream_sequencer.cc ('k') | net/quic/core/quic_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698