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 #include "ipc/ipc_message_attachment.h" | 10 #include "ipc/ipc_message_attachment.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 *attachment = attachment_set->GetAttachmentAt(descriptor_index); | 151 *attachment = attachment_set->GetAttachmentAt(descriptor_index); |
152 return nullptr != attachment->get(); | 152 return nullptr != attachment->get(); |
153 } | 153 } |
154 | 154 |
155 bool Message::HasAttachments() const { | 155 bool Message::HasAttachments() const { |
156 return attachment_set_.get() && !attachment_set_->empty(); | 156 return attachment_set_.get() && !attachment_set_->empty(); |
157 } | 157 } |
158 | 158 |
159 bool Message::HasMojoHandles() const { | 159 bool Message::HasMojoHandles() const { |
160 return attachment_set_.get() && 0 < attachment_set_->num_mojo_handles(); | 160 return attachment_set_.get() && attachment_set_->num_mojo_handles() > 0; |
| 161 } |
| 162 |
| 163 bool Message::HasBrokerableAttachments() const { |
| 164 return attachment_set_.get() && |
| 165 attachment_set_->num_brokerable_attachments() > 0; |
161 } | 166 } |
162 | 167 |
163 } // namespace IPC | 168 } // namespace IPC |
OLD | NEW |