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

Unified Diff: ipc/ipc_channel_win.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_win.h ('k') | ipc/ipc_message.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_win.cc
diff --git a/ipc/ipc_channel_win.cc b/ipc/ipc_channel_win.cc
index 05b9475a3487a627b196badd389e9a39a48a2b67..0a905a8ea5c1acf75edda250b90c3d55e0f013c2 100644
--- a/ipc/ipc_channel_win.cc
+++ b/ipc/ipc_channel_win.cc
@@ -172,13 +172,17 @@ ChannelWin::ReadState ChannelWin::ReadData(
return READ_PENDING;
}
-bool ChannelWin::WillDispatchInputMessage(Message* msg) {
+bool ChannelWin::ShouldDispatchInputMessage(Message* msg) {
// Make sure we get a hello when client validation is required.
if (validate_client_)
return IsHelloMessage(*msg);
return true;
}
+bool ChannelWin::GetNonBrokeredAttachments(Message* msg) {
+ return true;
+}
+
void ChannelWin::HandleInternalMessage(const Message& msg) {
DCHECK_EQ(msg.type(), static_cast<unsigned>(Channel::HELLO_MESSAGE_TYPE));
// The hello message contains one parameter containing the PID.
@@ -470,17 +474,18 @@ void ChannelWin::OnIOCompleted(
if (input_state_.is_pending) {
// This is the normal case for everything except the initialization step.
input_state_.is_pending = false;
- if (!bytes_transfered)
+ if (!bytes_transfered) {
ok = false;
- else if (pipe_.IsValid())
- ok = AsyncReadComplete(bytes_transfered);
+ } else if (pipe_.IsValid()) {
+ ok = (AsyncReadComplete(bytes_transfered) != DISPATCH_ERROR);
+ }
} else {
DCHECK(!bytes_transfered);
}
// Request more data.
if (ok)
- ok = ProcessIncomingMessages();
+ ok = (ProcessIncomingMessages() != DISPATCH_ERROR);
} else {
DCHECK(context == &output_state_.context);
CHECK(output_state_.is_pending);
« no previous file with comments | « ipc/ipc_channel_win.h ('k') | ipc/ipc_message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698