diff options
author | morrita@chromium.org <morrita@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-06 20:13:51 +0000 |
---|---|---|
committer | morrita@chromium.org <morrita@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-06 20:13:51 +0000 |
commit | 2f60c9b74db6c61424a5a9c731acef26a9260c9c (patch) | |
tree | ef3fb081703d0fb3f20f2d279f2d73310a14eac6 /ipc/ipc_test_sink.cc | |
parent | 42dbdaa6943939486e36e8ded5eb26f2419eeee3 (diff) | |
download | chromium_src-2f60c9b74db6c61424a5a9c731acef26a9260c9c.zip chromium_src-2f60c9b74db6c61424a5a9c731acef26a9260c9c.tar.gz chromium_src-2f60c9b74db6c61424a5a9c731acef26a9260c9c.tar.bz2 |
Make IPC::Channel polymorphic
This change makes each platform specific ChannelImpl into
a subclass of Channel: ChannelPosix, ChannelWin, ChannelNacl.
delegated functions are now virtual.
TEST=none
BUG=377980
R=darin@chromium.org, jam@chromium.org
Review URL: https://codereview.chromium.org/310293002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275505 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_test_sink.cc')
-rw-r--r-- | ipc/ipc_test_sink.cc | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/ipc/ipc_test_sink.cc b/ipc/ipc_test_sink.cc index 070fe12..65951fb 100644 --- a/ipc/ipc_test_sink.cc +++ b/ipc/ipc_test_sink.cc @@ -21,6 +21,21 @@ bool TestSink::Send(Message* message) { return true; } +bool TestSink::Connect() { + NOTIMPLEMENTED(); + return false; +} + +void TestSink::Close() { + NOTIMPLEMENTED(); +} + +base::ProcessId TestSink::GetPeerPID() const { + NOTIMPLEMENTED(); + return base::ProcessId(); +} + + bool TestSink::OnMessageReceived(const Message& msg) { ObserverListBase<Listener>::Iterator it(filter_list_); Listener* observer; @@ -74,4 +89,37 @@ void TestSink::RemoveFilter(Listener* filter) { filter_list_.RemoveObserver(filter); } +#if defined(OS_POSIX) && !defined(OS_NACL) + +int TestSink::GetClientFileDescriptor() const { + NOTREACHED(); + return -1; +} + +int TestSink::TakeClientFileDescriptor() { + NOTREACHED(); + return -1; +} + +bool TestSink::AcceptsConnections() const { + NOTREACHED(); + return false; +} + +bool TestSink::HasAcceptedConnection() const { + NOTREACHED(); + return false; +} + +bool TestSink::GetPeerEuid(uid_t* peer_euid) const { + NOTREACHED(); + return false; +} + +void TestSink::ResetToAcceptingConnectionState() { + NOTREACHED(); +} + +#endif // defined(OS_POSIX) && !defined(OS_NACL) + } // namespace IPC |