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

Side by Side Diff: ipc/ipc_channel_posix.cc

Issue 1385143002: ipc: Update MachPortMac ownership semantics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase errors. Created 5 years, 2 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
« no previous file with comments | « ipc/attachment_broker_unprivileged_win.cc ('k') | ipc/ipc_channel_reader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_channel_posix.h" 5 #include "ipc/ipc_channel_posix.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 } 690 }
691 } 691 }
692 692
693 bool ChannelPosix::ProcessMessageForDelivery(Message* message) { 693 bool ChannelPosix::ProcessMessageForDelivery(Message* message) {
694 // Sending a brokerable attachment requires a call to Channel::Send(), so 694 // Sending a brokerable attachment requires a call to Channel::Send(), so
695 // Send() may be re-entrant. Brokered attachments must be sent before the 695 // Send() may be re-entrant. Brokered attachments must be sent before the
696 // Message itself. 696 // Message itself.
697 if (message->HasBrokerableAttachments()) { 697 if (message->HasBrokerableAttachments()) {
698 DCHECK(GetAttachmentBroker()); 698 DCHECK(GetAttachmentBroker());
699 DCHECK(peer_pid_ != base::kNullProcessId); 699 DCHECK(peer_pid_ != base::kNullProcessId);
700 for (const BrokerableAttachment* attachment : 700 for (BrokerableAttachment* attachment :
701 message->attachment_set()->PeekBrokerableAttachments()) { 701 message->attachment_set()->GetBrokerableAttachments()) {
702 if (!GetAttachmentBroker()->SendAttachmentToProcess(attachment, 702 if (!GetAttachmentBroker()->SendAttachmentToProcess(attachment,
703 peer_pid_)) { 703 peer_pid_)) {
704 delete message; 704 delete message;
705 return false; 705 return false;
706 } 706 }
707 } 707 }
708 } 708 }
709 709
710 #ifdef IPC_MESSAGE_LOG_ENABLED 710 #ifdef IPC_MESSAGE_LOG_ENABLED
711 Logging::GetInstance()->OnSendMessage(message, ""); 711 Logging::GetInstance()->OnSendMessage(message, "");
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 } 1119 }
1120 1120
1121 #if defined(OS_LINUX) 1121 #if defined(OS_LINUX)
1122 // static 1122 // static
1123 void Channel::SetGlobalPid(int pid) { 1123 void Channel::SetGlobalPid(int pid) {
1124 ChannelPosix::SetGlobalPid(pid); 1124 ChannelPosix::SetGlobalPid(pid);
1125 } 1125 }
1126 #endif // OS_LINUX 1126 #endif // OS_LINUX
1127 1127
1128 } // namespace IPC 1128 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/attachment_broker_unprivileged_win.cc ('k') | ipc/ipc_channel_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698