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

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

Issue 612323013: QUIC - (no behavior change) s/NULL/nullptr/g in .../quic/... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/quic_unacked_packet_map_test.cc ('k') | net/quic/quic_utils_chromium_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 // 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/int128.h"
(...skipping 16 matching lines...) Expand all
27 // returns the 128 bit FNV1a hash of the data. See 27 // returns the 128 bit FNV1a hash of the data. See
28 // http://www.isthe.com/chongo/tech/comp/fnv/index.html#FNV-param 28 // http://www.isthe.com/chongo/tech/comp/fnv/index.html#FNV-param
29 static uint128 FNV1a_128_Hash(const char* data, int len); 29 static uint128 FNV1a_128_Hash(const char* data, int len);
30 30
31 // FindMutualTag sets |out_result| to the first tag in the priority list that 31 // FindMutualTag sets |out_result| to the first tag in the priority list that
32 // is also in the other list and returns true. If there is no intersection it 32 // is also in the other list and returns true. If there is no intersection it
33 // returns false. 33 // returns false.
34 // 34 //
35 // Which list has priority is determined by |priority|. 35 // Which list has priority is determined by |priority|.
36 // 36 //
37 // If |out_index| is non-NULL and a match is found then the index of that 37 // If |out_index| is non-nullptr and a match is found then the index of that
38 // match in |their_tags| is written to |out_index|. 38 // match in |their_tags| is written to |out_index|.
39 static bool FindMutualTag(const QuicTagVector& our_tags, 39 static bool FindMutualTag(const QuicTagVector& our_tags,
40 const QuicTag* their_tags, 40 const QuicTag* their_tags,
41 size_t num_their_tags, 41 size_t num_their_tags,
42 Priority priority, 42 Priority priority,
43 QuicTag* out_result, 43 QuicTag* out_result,
44 size_t* out_index); 44 size_t* out_index);
45 45
46 // SerializeUint128 writes |v| in little-endian form to |out|. 46 // SerializeUint128 writes |v| in little-endian form to |out|.
47 static void SerializeUint128(uint128 v, uint8* out); 47 static void SerializeUint128(uint128 v, uint8* out);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // Utility function that returns an IOVector object wrapped around |str|. 90 // Utility function that returns an IOVector object wrapped around |str|.
91 inline IOVector MakeIOVector(base::StringPiece str) { 91 inline IOVector MakeIOVector(base::StringPiece str) {
92 IOVector iov; 92 IOVector iov;
93 iov.Append(const_cast<char*>(str.data()), str.size()); 93 iov.Append(const_cast<char*>(str.data()), str.size());
94 return iov; 94 return iov;
95 } 95 }
96 96
97 } // namespace net 97 } // namespace net
98 98
99 #endif // NET_QUIC_QUIC_UTILS_H_ 99 #endif // NET_QUIC_QUIC_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/quic_unacked_packet_map_test.cc ('k') | net/quic/quic_utils_chromium_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698