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_CORE_QUIC_UTILS_H_ |
8 #define NET_QUIC_QUIC_UTILS_H_ | 8 #define NET_QUIC_CORE_QUIC_UTILS_H_ |
9 | 9 |
10 #include <stddef.h> | 10 #include <stddef.h> |
11 #include <stdint.h> | 11 #include <stdint.h> |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/strings/string_piece.h" | 16 #include "base/strings/string_piece.h" |
17 #include "net/base/int128.h" | 17 #include "net/base/int128.h" |
18 #include "net/base/net_export.h" | 18 #include "net/base/net_export.h" |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 // |str|'s data is stored in |iov|. | 150 // |str|'s data is stored in |iov|. |
151 inline QuicIOVector MakeIOVector(base::StringPiece str, struct iovec* iov) { | 151 inline QuicIOVector MakeIOVector(base::StringPiece str, struct iovec* iov) { |
152 iov->iov_base = const_cast<char*>(str.data()); | 152 iov->iov_base = const_cast<char*>(str.data()); |
153 iov->iov_len = static_cast<size_t>(str.size()); | 153 iov->iov_len = static_cast<size_t>(str.size()); |
154 QuicIOVector quic_iov(iov, 1, str.size()); | 154 QuicIOVector quic_iov(iov, 1, str.size()); |
155 return quic_iov; | 155 return quic_iov; |
156 } | 156 } |
157 | 157 |
158 } // namespace net | 158 } // namespace net |
159 | 159 |
160 #endif // NET_QUIC_QUIC_UTILS_H_ | 160 #endif // NET_QUIC_CORE_QUIC_UTILS_H_ |
OLD | NEW |