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 "ipc/ipc_channel.h" | 5 #include "ipc/ipc_channel.h" |
6 | 6 |
| 7 #include <stddef.h> |
7 #include <stdint.h> | 8 #include <stdint.h> |
8 | 9 |
9 #include <limits> | 10 #include <limits> |
10 | 11 |
11 #include "base/atomic_sequence_num.h" | 12 #include "base/atomic_sequence_num.h" |
12 #include "base/rand_util.h" | 13 #include "base/rand_util.h" |
13 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
| 15 #include "build/build_config.h" |
14 | 16 |
15 namespace { | 17 namespace { |
16 | 18 |
17 // Global atomic used to guarantee channel IDs are unique. | 19 // Global atomic used to guarantee channel IDs are unique. |
18 base::StaticAtomicSequenceNumber g_last_id; | 20 base::StaticAtomicSequenceNumber g_last_id; |
19 | 21 |
20 } // namespace | 22 } // namespace |
21 | 23 |
22 namespace IPC { | 24 namespace IPC { |
23 | 25 |
(...skipping 23 matching lines...) Expand all Loading... |
47 : message_(message), buffer_(nullptr), length_(0) {} | 49 : message_(message), buffer_(nullptr), length_(0) {} |
48 | 50 |
49 Channel::OutputElement::OutputElement(void* buffer, size_t length) | 51 Channel::OutputElement::OutputElement(void* buffer, size_t length) |
50 : message_(nullptr), buffer_(buffer), length_(length) {} | 52 : message_(nullptr), buffer_(buffer), length_(length) {} |
51 | 53 |
52 Channel::OutputElement::~OutputElement() { | 54 Channel::OutputElement::~OutputElement() { |
53 free(buffer_); | 55 free(buffer_); |
54 } | 56 } |
55 | 57 |
56 } // namespace IPC | 58 } // namespace IPC |
OLD | NEW |