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_message.h" | 5 #include "ipc/ipc_message.h" |
6 | 6 |
7 #include "base/atomic_sequence_num.h" | 7 #include "base/atomic_sequence_num.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 void Message::InitLoggingVariables() { | 77 void Message::InitLoggingVariables() { |
78 #ifdef IPC_MESSAGE_LOG_ENABLED | 78 #ifdef IPC_MESSAGE_LOG_ENABLED |
79 received_time_ = 0; | 79 received_time_ = 0; |
80 dont_log_ = false; | 80 dont_log_ = false; |
81 log_data_ = NULL; | 81 log_data_ = NULL; |
82 #endif | 82 #endif |
83 } | 83 } |
84 | 84 |
85 Message& Message::operator=(const Message& other) { | 85 Message& Message::operator=(const Message& other) { |
86 *static_cast<Pickle*>(this) = other; | 86 *static_cast<Pickle*>(this) = other; |
87 // TODO(vtl): Remove once bug resolved. | |
88 CHECK(header()) << "crbug.com/357915"; | |
89 #if defined(OS_POSIX) | 87 #if defined(OS_POSIX) |
90 file_descriptor_set_ = other.file_descriptor_set_; | 88 file_descriptor_set_ = other.file_descriptor_set_; |
91 #endif | 89 #endif |
92 return *this; | 90 return *this; |
93 } | 91 } |
94 | 92 |
95 void Message::SetHeaderValues(int32 routing, uint32 type, uint32 flags) { | 93 void Message::SetHeaderValues(int32 routing, uint32 type, uint32 flags) { |
96 // This should only be called when the message is already empty. | 94 // This should only be called when the message is already empty. |
97 DCHECK(payload_size() == 0); | 95 DCHECK(payload_size() == 0); |
98 | 96 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 } | 153 } |
156 | 154 |
157 void Message::EnsureFileDescriptorSet() { | 155 void Message::EnsureFileDescriptorSet() { |
158 if (file_descriptor_set_.get() == NULL) | 156 if (file_descriptor_set_.get() == NULL) |
159 file_descriptor_set_ = new FileDescriptorSet; | 157 file_descriptor_set_ = new FileDescriptorSet; |
160 } | 158 } |
161 | 159 |
162 #endif | 160 #endif |
163 | 161 |
164 } // namespace IPC | 162 } // namespace IPC |
OLD | NEW |