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

Unified Diff: ipc/ipc_channel_posix.cc

Issue 1206093002: Update ChannelReader to use AttachmentBroker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@attachment_broker3_listener
Patch Set: Comments from tsepez. Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ipc/ipc_channel_posix.h ('k') | ipc/ipc_channel_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_posix.cc
diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc
index 8f995fb0111d01db7318c6599cf1ba1a5271b330..b28cc527d62028c56d2b383c88ac2da2f356dfee 100644
--- a/ipc/ipc_channel_posix.cc
+++ b/ipc/ipc_channel_posix.cc
@@ -652,7 +652,7 @@ void ChannelPosix::OnFileCanReadWithoutBlocking(int fd) {
if (waiting_connect_ && (mode_ & MODE_SERVER_FLAG)) {
waiting_connect_ = false;
}
- if (!ProcessIncomingMessages()) {
+ if (ProcessIncomingMessages() == DISPATCH_ERROR) {
// ClosePipeOnError may delete this object, so we mustn't call
// ProcessOutgoingMessages.
ClosePipeOnError();
@@ -799,12 +799,16 @@ ChannelPosix::ReadState ChannelPosix::ReadData(
return READ_SUCCEEDED;
}
+bool ChannelPosix::ShouldDispatchInputMessage(Message* msg) {
+ return true;
+}
+
// On Posix, we need to fix up the file descriptors before the input message
// is dispatched.
//
// This will read from the input_fds_ (READWRITE mode only) and read more
// handles from the FD pipe if necessary.
-bool ChannelPosix::WillDispatchInputMessage(Message* msg) {
+bool ChannelPosix::GetNonBrokeredAttachments(Message* msg) {
uint16 header_fds = msg->header()->num_fds;
if (!header_fds)
return true; // Nothing to do.
« no previous file with comments | « ipc/ipc_channel_posix.h ('k') | ipc/ipc_channel_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698