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

Unified Diff: ipc/ipc_channel_nacl.h

Issue 310293002: Make IPC::Channel polymorphic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another attempt to fix build breakage Created 6 years, 6 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_common.cc ('k') | ipc/ipc_channel_nacl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_nacl.h
diff --git a/ipc/ipc_channel_nacl.h b/ipc/ipc_channel_nacl.h
index 29a9d57570fb77a61404f547d41dabbddd9f94d3..c47892d25c46d7b3b026b56b61057f6dddeb5dd7 100644
--- a/ipc/ipc_channel_nacl.h
+++ b/ipc/ipc_channel_nacl.h
@@ -22,7 +22,7 @@ namespace IPC {
// descriptors).
struct MessageContents;
-// Similar to the Posix version of ChannelImpl but for Native Client code.
+// Similar to the ChannelPosix but for Native Client code.
// This is somewhat different because sendmsg/recvmsg here do not follow POSIX
// semantics. Instead, they are implemented by a custom embedding of
// NaClDescCustom. See NaClIPCAdapter for the trusted-side implementation.
@@ -31,19 +31,20 @@ struct MessageContents;
// sharing handles. We also currently do not support passing file descriptors or
// named pipes, and we use background threads to emulate signaling when we can
// read or write without blocking.
-class Channel::ChannelImpl : public internal::ChannelReader {
+class ChannelNacl : public Channel,
+ public internal::ChannelReader {
public:
// Mirror methods of Channel, see ipc_channel.h for description.
- ChannelImpl(const IPC::ChannelHandle& channel_handle,
+ ChannelNacl(const IPC::ChannelHandle& channel_handle,
Mode mode,
Listener* listener);
- virtual ~ChannelImpl();
+ virtual ~ChannelNacl();
// Channel implementation.
- base::ProcessId peer_pid() const;
- bool Connect();
- void Close();
- bool Send(Message* message);
+ virtual base::ProcessId GetPeerPID() const OVERRIDE;
+ virtual bool Connect() OVERRIDE;
+ virtual void Close() OVERRIDE;
+ virtual bool Send(Message* message) OVERRIDE;
// Posted to the main thread by ReaderThreadRunner.
void DidRecvMsg(scoped_ptr<MessageContents> contents);
@@ -110,9 +111,9 @@ class Channel::ChannelImpl : public internal::ChannelReader {
// called. Normally after we're connected, the queue is empty.
std::deque<linked_ptr<Message> > output_queue_;
- base::WeakPtrFactory<ChannelImpl> weak_ptr_factory_;
+ base::WeakPtrFactory<ChannelNacl> weak_ptr_factory_;
- DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelImpl);
+ DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelNacl);
};
} // namespace IPC
« no previous file with comments | « ipc/ipc_channel_common.cc ('k') | ipc/ipc_channel_nacl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698