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

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

Issue 2512063003: Move QuicIoVector into its own header file. No behavior change. (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.h ('k') | net/quic/test_tools/quic_packet_creator_peer.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_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>
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"
19 #include "net/quic/core/quic_iovector.h"
19 #include "net/quic/core/quic_protocol.h" 20 #include "net/quic/core/quic_protocol.h"
20 21
21 #ifdef _MSC_VER 22 #ifdef _MSC_VER
22 // MSVC 2013 and prior don't have alignof or aligned(); they have __alignof and 23 // MSVC 2013 and prior don't have alignof or aligned(); they have __alignof and
23 // a __declspec instead. 24 // a __declspec instead.
24 #define QUIC_ALIGN_OF __alignof 25 #define QUIC_ALIGN_OF __alignof
25 #define QUIC_ALIGNED(X) __declspec(align(X)) 26 #define QUIC_ALIGNED(X) __declspec(align(X))
26 #else 27 #else
27 #define QUIC_ALIGN_OF alignof 28 #define QUIC_ALIGN_OF alignof
28 #define QUIC_ALIGNED(X) __attribute__((aligned(X))) 29 #define QUIC_ALIGNED(X) __attribute__((aligned(X)))
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 inline QuicIOVector MakeIOVector(base::StringPiece str, struct iovec* iov) { 144 inline QuicIOVector MakeIOVector(base::StringPiece str, struct iovec* iov) {
144 iov->iov_base = const_cast<char*>(str.data()); 145 iov->iov_base = const_cast<char*>(str.data());
145 iov->iov_len = static_cast<size_t>(str.size()); 146 iov->iov_len = static_cast<size_t>(str.size());
146 QuicIOVector quic_iov(iov, 1, str.size()); 147 QuicIOVector quic_iov(iov, 1, str.size());
147 return quic_iov; 148 return quic_iov;
148 } 149 }
149 150
150 } // namespace net 151 } // namespace net
151 152
152 #endif // NET_QUIC_CORE_QUIC_UTILS_H_ 153 #endif // NET_QUIC_CORE_QUIC_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_stream.h ('k') | net/quic/test_tools/quic_packet_creator_peer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698