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 #include "net/quic/core/quic_data_writer.h" | 5 #include "net/quic/core/quic_data_writer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "net/quic/core/quic_flags.h" | |
11 #include "net/quic/core/quic_utils.h" | 10 #include "net/quic/core/quic_utils.h" |
12 #include "net/quic/platform/api/quic_endian.h" | 11 #include "net/quic/platform/api/quic_endian.h" |
| 12 #include "net/quic/platform/api/quic_flags.h" |
13 #include "net/quic/platform/api/quic_logging.h" | 13 #include "net/quic/platform/api/quic_logging.h" |
14 | 14 |
15 namespace net { | 15 namespace net { |
16 | 16 |
17 #define ENDPOINT \ | 17 #define ENDPOINT \ |
18 (perspective_ == Perspective::IS_SERVER ? "Server: " : "Client: ") | 18 (perspective_ == Perspective::IS_SERVER ? "Server: " : "Client: ") |
19 | 19 |
20 QuicDataWriter::QuicDataWriter(size_t size, | 20 QuicDataWriter::QuicDataWriter(size_t size, |
21 char* buffer, | 21 char* buffer, |
22 Perspective perspective) | 22 Perspective perspective) |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 } | 160 } |
161 | 161 |
162 return WriteUInt64(connection_id); | 162 return WriteUInt64(connection_id); |
163 } | 163 } |
164 | 164 |
165 bool QuicDataWriter::WriteTag(uint32_t tag) { | 165 bool QuicDataWriter::WriteTag(uint32_t tag) { |
166 return WriteBytes(&tag, sizeof(tag)); | 166 return WriteBytes(&tag, sizeof(tag)); |
167 } | 167 } |
168 | 168 |
169 } // namespace net | 169 } // namespace net |
OLD | NEW |