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

Side by Side Diff: ipc/ipc_message.cc

Issue 866223005: IPC: Add MojoHandleAttachment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing windows buld error Created 5 years, 10 months 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
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 #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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 return false; 148 return false;
149 149
150 *attachment = attachment_set->GetAttachmentAt(descriptor_index); 150 *attachment = attachment_set->GetAttachmentAt(descriptor_index);
151 return nullptr != attachment->get(); 151 return nullptr != attachment->get();
152 } 152 }
153 153
154 bool Message::HasAttachments() const { 154 bool Message::HasAttachments() const {
155 return attachment_set_.get() && !attachment_set_->empty(); 155 return attachment_set_.get() && !attachment_set_->empty();
156 } 156 }
157 157
158 bool Message::HasMojoHandles() const {
159 return attachment_set_.get() && attachment_set_->num_mojo_handles();
agl 2015/02/04 00:17:46 Feel free to ignore: put "> 0" on the end to avoid
Hajime Morrita 2015/02/04 00:44:51 Done. That's clearer anyway.
160 }
161
158 } // namespace IPC 162 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698