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

Unified Diff: mojo/system/raw_channel_posix.cc

Issue 297683012: Mojo: Add a RawChannel::EnqueueMessage() that can be overridden by subclasses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « mojo/system/raw_channel.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/raw_channel_posix.cc
diff --git a/mojo/system/raw_channel_posix.cc b/mojo/system/raw_channel_posix.cc
index ecacd29778a27ed899749d896c2155a635f11205..cc6324d547785faf3a93fe498fa85c7671061c4e 100644
--- a/mojo/system/raw_channel_posix.cc
+++ b/mojo/system/raw_channel_posix.cc
@@ -41,6 +41,10 @@ class RawChannelPosix : public RawChannel,
private:
// |RawChannel| protected methods:
+ // Actually override |EnqueueMessageNoLock()| so that we can send multiple
+ // messages with FDs if necessary.
+ virtual void EnqueueMessageNoLock(
+ scoped_ptr<MessageInTransit> message) OVERRIDE;
virtual IOResult Read(size_t* bytes_read) OVERRIDE;
virtual IOResult ScheduleRead() OVERRIDE;
virtual embedder::ScopedPlatformHandleVectorPtr GetReadPlatformHandles(
@@ -112,6 +116,13 @@ size_t RawChannelPosix::GetSerializedPlatformHandleSize() const {
return 0;
}
+void RawChannelPosix::EnqueueMessageNoLock(
+ scoped_ptr<MessageInTransit> message) {
+ // TODO(vtl): Split any message with too many platform handles into multiple
+ // messages.
+ RawChannel::EnqueueMessageNoLock(message.Pass());
+}
+
RawChannel::IOResult RawChannelPosix::Read(size_t* bytes_read) {
DCHECK_EQ(base::MessageLoop::current(), message_loop_for_io());
DCHECK(!pending_read_);
« no previous file with comments | « mojo/system/raw_channel.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698