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

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

Issue 11299023: Add real support for uint128. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One more try Created 8 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/uint128.h » ('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_QUIC_UTILS_H_ 7 #ifndef NET_QUIC_QUIC_UTILS_H_
8 #define NET_QUIC_QUIC_UTILS_H_ 8 #define NET_QUIC_QUIC_UTILS_H_
9 9
10 #include "net/base/int128.h"
10 #include "net/base/net_export.h" 11 #include "net/base/net_export.h"
11 #include "net/quic/quic_protocol.h" 12 #include "net/quic/quic_protocol.h"
12 #include "net/quic/uint128.h"
13 13
14 class IPAddress; 14 class IPAddress;
15 class IPEndPoint; 15 class IPEndPoint;
16 16
17 namespace gfe2 { 17 namespace gfe2 {
18 class BalsaHeaders; 18 class BalsaHeaders;
19 } 19 }
20 20
21 namespace net { 21 namespace net {
22 22
23 class NET_EXPORT_PRIVATE QuicUtils { 23 class NET_EXPORT_PRIVATE QuicUtils {
24 public: 24 public:
25 // The overhead the quic framing will add for a packet with num_frames 25 // The overhead the quic framing will add for a packet with num_frames
26 // frames. 26 // frames.
27 static size_t StreamFramePacketOverhead(int num_frames); 27 static size_t StreamFramePacketOverhead(int num_frames);
28 28
29 // returns the 128 bit FNV1a hash of the data. See 29 // returns the 128 bit FNV1a hash of the data. See
30 // http://www.isthe.com/chongo/tech/comp/fnv/index.html#FNV-param 30 // http://www.isthe.com/chongo/tech/comp/fnv/index.html#FNV-param
31 static uint128 FNV1a_128_Hash(const char* data, int len); 31 static uint128 FNV1a_128_Hash(const char* data, int len);
32 32
33 // Returns the name of the quic error code as a char* 33 // Returns the name of the quic error code as a char*
34 static const char* ErrorToString(QuicErrorCode error); 34 static const char* ErrorToString(QuicErrorCode error);
35 }; 35 };
36 36
37 } // namespace net 37 } // namespace net
38 38
39 #endif // NET_QUIC_QUIC_UTILS_H_ 39 #endif // NET_QUIC_QUIC_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/uint128.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698