OLD | NEW |
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // "0x0020: 7fe2 0800 6bcb 0bc6 806e ....k....n\n" | 75 // "0x0020: 7fe2 0800 6bcb 0bc6 806e ....k....n\n" |
76 static std::string StringToHexASCIIDump(base::StringPiece in_buffer); | 76 static std::string StringToHexASCIIDump(base::StringPiece in_buffer); |
77 | 77 |
78 static char* AsChars(unsigned char* data) { | 78 static char* AsChars(unsigned char* data) { |
79 return reinterpret_cast<char*>(data); | 79 return reinterpret_cast<char*>(data); |
80 } | 80 } |
81 | 81 |
82 static QuicPriority LowestPriority(); | 82 static QuicPriority LowestPriority(); |
83 | 83 |
84 static QuicPriority HighestPriority(); | 84 static QuicPriority HighestPriority(); |
| 85 |
| 86 private: |
| 87 DISALLOW_COPY_AND_ASSIGN(QuicUtils); |
85 }; | 88 }; |
86 | 89 |
87 // Utility function that returns an IOVector object wrapped around |str|. | 90 // Utility function that returns an IOVector object wrapped around |str|. |
88 inline IOVector MakeIOVector(base::StringPiece str) { | 91 inline IOVector MakeIOVector(base::StringPiece str) { |
89 IOVector iov; | 92 IOVector iov; |
90 iov.Append(const_cast<char*>(str.data()), str.size()); | 93 iov.Append(const_cast<char*>(str.data()), str.size()); |
91 return iov; | 94 return iov; |
92 } | 95 } |
93 | 96 |
94 } // namespace net | 97 } // namespace net |
95 | 98 |
96 #endif // NET_QUIC_QUIC_UTILS_H_ | 99 #endif // NET_QUIC_QUIC_UTILS_H_ |
OLD | NEW |