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

Unified Diff: mojo/edk/system/message_pipe.cc

Issue 737663003: Remove MessageInTransit::kTypeMessagePipe; rename kTypeMessagePipeEndpoint to kTypeEndpoint; etc. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years 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 | « mojo/edk/system/message_pipe.h ('k') | mojo/edk/system/raw_channel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/message_pipe.cc
diff --git a/mojo/edk/system/message_pipe.cc b/mojo/edk/system/message_pipe.cc
index 8e1be57fe700fcf1eafbbc3c7cdf1ee609c66033..0a44d5f9d5716f0c3636a6e3efc706ac0f121542 100644
--- a/mojo/edk/system/message_pipe.cc
+++ b/mojo/edk/system/message_pipe.cc
@@ -142,8 +142,8 @@ MojoResult MessagePipe::WriteMessage(
return EnqueueMessage(
GetPeerPort(port),
make_scoped_ptr(new MessageInTransit(
- MessageInTransit::kTypeMessagePipeEndpoint,
- MessageInTransit::kSubtypeMessagePipeEndpointData, num_bytes, bytes)),
+ MessageInTransit::kTypeEndpoint,
+ MessageInTransit::kSubtypeEndpointData, num_bytes, bytes)),
transports);
}
@@ -319,12 +319,7 @@ MojoResult MessagePipe::EnqueueMessage(
DCHECK(port == 0 || port == 1);
DCHECK(message);
- if (message->type() == MessageInTransit::kTypeMessagePipe) {
- DCHECK(!transports);
- return HandleControlMessage(port, message.Pass());
- }
-
- DCHECK_EQ(message->type(), MessageInTransit::kTypeMessagePipeEndpoint);
+ DCHECK_EQ(message->type(), MessageInTransit::kTypeEndpoint);
base::AutoLock locker(lock_);
DCHECK(endpoints_[GetPeerPort(port)]);
@@ -388,13 +383,5 @@ MojoResult MessagePipe::AttachTransportsNoLock(
return MOJO_RESULT_OK;
}
-MojoResult MessagePipe::HandleControlMessage(
- unsigned /*port*/,
- scoped_ptr<MessageInTransit> message) {
- LOG(WARNING) << "Unrecognized MessagePipe control message subtype "
- << message->subtype();
- return MOJO_RESULT_UNKNOWN;
-}
-
} // namespace system
} // namespace mojo
« no previous file with comments | « mojo/edk/system/message_pipe.h ('k') | mojo/edk/system/raw_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698