Commit 5210d592 authored by morrita@chromium.org's avatar morrita@chromium.org

IPC::Channel: Reduce POSIX specific API surface

This change is a simple cleanup: It removes some Channel API
that is only used only in POSIX specific tests. These
funtions still live in ChannelPosix. POSIX speicific tests
now touch ChannelPosix instead of its superclass Channel.

TEST=none
R=darin@chromium.org, jam@chromium.org
BUG=377980

Review URL: https://codereview.chromium.org/320433002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275632 0039d316-1c4b-4281-b951-d872f2087c98
parent 231f7a25
...@@ -187,26 +187,6 @@ class IPC_EXPORT Channel : public Sender { ...@@ -187,26 +187,6 @@ class IPC_EXPORT Channel : public Sender {
// file descriptor to the caller. // file descriptor to the caller.
// This method can be called on any thread. // This method can be called on any thread.
virtual int TakeClientFileDescriptor() = 0; virtual int TakeClientFileDescriptor() = 0;
// On POSIX an IPC::Channel can either wrap an established socket, or it
// can wrap a socket that is listening for connections. Currently an
// IPC::Channel that listens for connections can only accept one connection
// at a time.
// Returns true if the channel supports listening for connections.
virtual bool AcceptsConnections() const = 0;
// Returns true if the channel supports listening for connections and is
// currently connected.
virtual bool HasAcceptedConnection() const = 0;
// Returns true if the peer process' effective user id can be determined, in
// which case the supplied peer_euid is updated with it.
virtual bool GetPeerEuid(uid_t* peer_euid) const = 0;
// Closes any currently connected socket, and returns to a listening state
// for more connections.
virtual void ResetToAcceptingConnectionState() = 0;
#endif // defined(OS_POSIX) && !defined(OS_NACL) #endif // defined(OS_POSIX) && !defined(OS_NACL)
// Returns true if a named server channel is initialized on the given channel // Returns true if a named server channel is initialized on the given channel
......
...@@ -1056,8 +1056,8 @@ base::ProcessId ChannelPosix::GetPeerPID() const { ...@@ -1056,8 +1056,8 @@ base::ProcessId ChannelPosix::GetPeerPID() const {
// static // static
scoped_ptr<Channel> Channel::Create( scoped_ptr<Channel> Channel::Create(
const IPC::ChannelHandle &channel_handle, Mode mode, Listener* listener) { const IPC::ChannelHandle &channel_handle, Mode mode, Listener* listener) {
return scoped_ptr<Channel>( return make_scoped_ptr(new ChannelPosix(
new ChannelPosix(channel_handle, mode, listener)); channel_handle, mode, listener)).PassAs<Channel>();
} }
// static // static
......
...@@ -49,11 +49,10 @@ ...@@ -49,11 +49,10 @@
namespace IPC { namespace IPC {
class ChannelPosix : public Channel, class IPC_EXPORT ChannelPosix : public Channel,
public internal::ChannelReader, public internal::ChannelReader,
public base::MessageLoopForIO::Watcher { public base::MessageLoopForIO::Watcher {
public: public:
// Mirror methods of Channel, see ipc_channel.h for description.
ChannelPosix(const IPC::ChannelHandle& channel_handle, Mode mode, ChannelPosix(const IPC::ChannelHandle& channel_handle, Mode mode,
Listener* listener); Listener* listener);
virtual ~ChannelPosix(); virtual ~ChannelPosix();
...@@ -65,10 +64,21 @@ class ChannelPosix : public Channel, ...@@ -65,10 +64,21 @@ class ChannelPosix : public Channel,
virtual base::ProcessId GetPeerPID() const OVERRIDE; virtual base::ProcessId GetPeerPID() const OVERRIDE;
virtual int GetClientFileDescriptor() const OVERRIDE; virtual int GetClientFileDescriptor() const OVERRIDE;
virtual int TakeClientFileDescriptor() OVERRIDE; virtual int TakeClientFileDescriptor() OVERRIDE;
virtual bool AcceptsConnections() const OVERRIDE;
virtual bool HasAcceptedConnection() const OVERRIDE; // Returns true if the channel supports listening for connections.
virtual bool GetPeerEuid(uid_t* peer_euid) const OVERRIDE; bool AcceptsConnections() const;
virtual void ResetToAcceptingConnectionState() OVERRIDE;
// Returns true if the channel supports listening for connections and is
// currently connected.
bool HasAcceptedConnection() const;
// Closes any currently connected socket, and returns to a listening state
// for more connections.
void ResetToAcceptingConnectionState();
// Returns true if the peer process' effective user id can be determined, in
// which case the supplied peer_euid is updated with it.
bool GetPeerEuid(uid_t* peer_euid) const;
void CloseClientFileDescriptor(); void CloseClientFileDescriptor();
......
...@@ -204,8 +204,8 @@ TEST_F(IPCChannelPosixTest, BasicListen) { ...@@ -204,8 +204,8 @@ TEST_F(IPCChannelPosixTest, BasicListen) {
IPC::ChannelHandle handle(kChannelName); IPC::ChannelHandle handle(kChannelName);
SetUpSocket(&handle, IPC::Channel::MODE_NAMED_SERVER); SetUpSocket(&handle, IPC::Channel::MODE_NAMED_SERVER);
unlink(handle.name.c_str()); unlink(handle.name.c_str());
scoped_ptr<IPC::Channel> channel( scoped_ptr<IPC::ChannelPosix> channel(
IPC::Channel::CreateNamedServer(handle, NULL)); new IPC::ChannelPosix(handle, IPC::Channel::MODE_NAMED_SERVER, NULL));
ASSERT_TRUE(channel->Connect()); ASSERT_TRUE(channel->Connect());
ASSERT_TRUE(channel->AcceptsConnections()); ASSERT_TRUE(channel->AcceptsConnections());
ASSERT_FALSE(channel->HasAcceptedConnection()); ASSERT_FALSE(channel->HasAcceptedConnection());
...@@ -222,7 +222,8 @@ TEST_F(IPCChannelPosixTest, BasicConnected) { ...@@ -222,7 +222,8 @@ TEST_F(IPCChannelPosixTest, BasicConnected) {
base::FileDescriptor fd(pipe_fds[0], false); base::FileDescriptor fd(pipe_fds[0], false);
IPC::ChannelHandle handle(socket_name, fd); IPC::ChannelHandle handle(socket_name, fd);
scoped_ptr<IPC::Channel> channel(IPC::Channel::CreateServer(handle, NULL)); scoped_ptr<IPC::ChannelPosix> channel(new IPC::ChannelPosix(
handle, IPC::Channel::MODE_SERVER, NULL));
ASSERT_TRUE(channel->Connect()); ASSERT_TRUE(channel->Connect());
ASSERT_FALSE(channel->AcceptsConnections()); ASSERT_FALSE(channel->AcceptsConnections());
channel->Close(); channel->Close();
...@@ -230,8 +231,8 @@ TEST_F(IPCChannelPosixTest, BasicConnected) { ...@@ -230,8 +231,8 @@ TEST_F(IPCChannelPosixTest, BasicConnected) {
// Make sure that we can use the socket that is created for us by // Make sure that we can use the socket that is created for us by
// a standard channel. // a standard channel.
scoped_ptr<IPC::Channel> channel2( scoped_ptr<IPC::ChannelPosix> channel2(new IPC::ChannelPosix(
IPC::Channel::CreateServer(socket_name, NULL)); socket_name, IPC::Channel::MODE_SERVER, NULL));
ASSERT_TRUE(channel2->Connect()); ASSERT_TRUE(channel2->Connect());
ASSERT_FALSE(channel2->AcceptsConnections()); ASSERT_FALSE(channel2->AcceptsConnections());
} }
...@@ -243,13 +244,13 @@ TEST_F(IPCChannelPosixTest, SendHangTest) { ...@@ -243,13 +244,13 @@ TEST_F(IPCChannelPosixTest, SendHangTest) {
IPCChannelPosixTestListener out_listener(true); IPCChannelPosixTestListener out_listener(true);
IPCChannelPosixTestListener in_listener(true); IPCChannelPosixTestListener in_listener(true);
IPC::ChannelHandle in_handle("IN"); IPC::ChannelHandle in_handle("IN");
scoped_ptr<IPC::Channel> in_chan( scoped_ptr<IPC::ChannelPosix> in_chan(new IPC::ChannelPosix(
IPC::Channel::CreateServer(in_handle, &in_listener)); in_handle, IPC::Channel::MODE_SERVER, &in_listener));
base::FileDescriptor out_fd( base::FileDescriptor out_fd(
in_chan->TakeClientFileDescriptor(), false); in_chan->TakeClientFileDescriptor(), false);
IPC::ChannelHandle out_handle("OUT", out_fd); IPC::ChannelHandle out_handle("OUT", out_fd);
scoped_ptr<IPC::Channel> out_chan( scoped_ptr<IPC::ChannelPosix> out_chan(new IPC::ChannelPosix(
IPC::Channel::CreateClient(out_handle, &out_listener)); out_handle, IPC::Channel::MODE_CLIENT, &out_listener));
ASSERT_TRUE(in_chan->Connect()); ASSERT_TRUE(in_chan->Connect());
ASSERT_TRUE(out_chan->Connect()); ASSERT_TRUE(out_chan->Connect());
in_chan->Close(); // simulate remote process dying at an unfortunate time. in_chan->Close(); // simulate remote process dying at an unfortunate time.
...@@ -269,13 +270,13 @@ TEST_F(IPCChannelPosixTest, AcceptHangTest) { ...@@ -269,13 +270,13 @@ TEST_F(IPCChannelPosixTest, AcceptHangTest) {
IPCChannelPosixTestListener out_listener(true); IPCChannelPosixTestListener out_listener(true);
IPCChannelPosixTestListener in_listener(true); IPCChannelPosixTestListener in_listener(true);
IPC::ChannelHandle in_handle("IN"); IPC::ChannelHandle in_handle("IN");
scoped_ptr<IPC::Channel> in_chan( scoped_ptr<IPC::ChannelPosix> in_chan(new IPC::ChannelPosix(
IPC::Channel::CreateServer(in_handle, &in_listener)); in_handle, IPC::Channel::MODE_SERVER, &in_listener));
base::FileDescriptor out_fd( base::FileDescriptor out_fd(
in_chan->TakeClientFileDescriptor(), false); in_chan->TakeClientFileDescriptor(), false);
IPC::ChannelHandle out_handle("OUT", out_fd); IPC::ChannelHandle out_handle("OUT", out_fd);
scoped_ptr<IPC::Channel> out_chan( scoped_ptr<IPC::ChannelPosix> out_chan(new IPC::ChannelPosix(
IPC::Channel::CreateClient(out_handle, &out_listener)); out_handle, IPC::Channel::MODE_CLIENT, &out_listener));
ASSERT_TRUE(in_chan->Connect()); ASSERT_TRUE(in_chan->Connect());
in_chan->Close(); // simulate remote process dying at an unfortunate time. in_chan->Close(); // simulate remote process dying at an unfortunate time.
ASSERT_FALSE(out_chan->Connect()); ASSERT_FALSE(out_chan->Connect());
...@@ -288,8 +289,8 @@ TEST_F(IPCChannelPosixTest, AdvancedConnected) { ...@@ -288,8 +289,8 @@ TEST_F(IPCChannelPosixTest, AdvancedConnected) {
IPCChannelPosixTestListener listener(false); IPCChannelPosixTestListener listener(false);
IPC::ChannelHandle chan_handle(GetConnectionSocketName()); IPC::ChannelHandle chan_handle(GetConnectionSocketName());
SetUpSocket(&chan_handle, IPC::Channel::MODE_NAMED_SERVER); SetUpSocket(&chan_handle, IPC::Channel::MODE_NAMED_SERVER);
scoped_ptr<IPC::Channel> channel( scoped_ptr<IPC::ChannelPosix> channel(new IPC::ChannelPosix(
IPC::Channel::CreateNamedServer(chan_handle, &listener)); chan_handle, IPC::Channel::MODE_NAMED_SERVER, &listener));
ASSERT_TRUE(channel->Connect()); ASSERT_TRUE(channel->Connect());
ASSERT_TRUE(channel->AcceptsConnections()); ASSERT_TRUE(channel->AcceptsConnections());
ASSERT_FALSE(channel->HasAcceptedConnection()); ASSERT_FALSE(channel->HasAcceptedConnection());
...@@ -318,8 +319,8 @@ TEST_F(IPCChannelPosixTest, ResetState) { ...@@ -318,8 +319,8 @@ TEST_F(IPCChannelPosixTest, ResetState) {
IPCChannelPosixTestListener listener(false); IPCChannelPosixTestListener listener(false);
IPC::ChannelHandle chan_handle(GetConnectionSocketName()); IPC::ChannelHandle chan_handle(GetConnectionSocketName());
SetUpSocket(&chan_handle, IPC::Channel::MODE_NAMED_SERVER); SetUpSocket(&chan_handle, IPC::Channel::MODE_NAMED_SERVER);
scoped_ptr<IPC::Channel> channel( scoped_ptr<IPC::ChannelPosix> channel(new IPC::ChannelPosix(
IPC::Channel::CreateNamedServer(chan_handle, &listener)); chan_handle, IPC::Channel::MODE_NAMED_SERVER, &listener));
ASSERT_TRUE(channel->Connect()); ASSERT_TRUE(channel->Connect());
ASSERT_TRUE(channel->AcceptsConnections()); ASSERT_TRUE(channel->AcceptsConnections());
ASSERT_FALSE(channel->HasAcceptedConnection()); ASSERT_FALSE(channel->HasAcceptedConnection());
...@@ -353,8 +354,8 @@ TEST_F(IPCChannelPosixTest, ResetState) { ...@@ -353,8 +354,8 @@ TEST_F(IPCChannelPosixTest, ResetState) {
TEST_F(IPCChannelPosixTest, BadChannelName) { TEST_F(IPCChannelPosixTest, BadChannelName) {
// Test empty name // Test empty name
IPC::ChannelHandle handle(""); IPC::ChannelHandle handle("");
scoped_ptr<IPC::Channel> channel( scoped_ptr<IPC::ChannelPosix> channel(new IPC::ChannelPosix(
IPC::Channel::CreateNamedServer(handle, NULL)); handle, IPC::Channel::MODE_NAMED_SERVER, NULL));
ASSERT_FALSE(channel->Connect()); ASSERT_FALSE(channel->Connect());
// Test name that is too long. // Test name that is too long.
...@@ -367,8 +368,8 @@ TEST_F(IPCChannelPosixTest, BadChannelName) { ...@@ -367,8 +368,8 @@ TEST_F(IPCChannelPosixTest, BadChannelName) {
"leading-edge_processes"; "leading-edge_processes";
EXPECT_GE(strlen(kTooLongName), IPC::kMaxSocketNameLength); EXPECT_GE(strlen(kTooLongName), IPC::kMaxSocketNameLength);
IPC::ChannelHandle handle2(kTooLongName); IPC::ChannelHandle handle2(kTooLongName);
scoped_ptr<IPC::Channel> channel2( scoped_ptr<IPC::ChannelPosix> channel2(new IPC::ChannelPosix(
IPC::Channel::CreateNamedServer(handle2, NULL)); handle2, IPC::Channel::MODE_NAMED_SERVER, NULL));
EXPECT_FALSE(channel2->Connect()); EXPECT_FALSE(channel2->Connect());
} }
...@@ -378,8 +379,8 @@ TEST_F(IPCChannelPosixTest, MultiConnection) { ...@@ -378,8 +379,8 @@ TEST_F(IPCChannelPosixTest, MultiConnection) {
IPCChannelPosixTestListener listener(false); IPCChannelPosixTestListener listener(false);
IPC::ChannelHandle chan_handle(GetConnectionSocketName()); IPC::ChannelHandle chan_handle(GetConnectionSocketName());
SetUpSocket(&chan_handle, IPC::Channel::MODE_NAMED_SERVER); SetUpSocket(&chan_handle, IPC::Channel::MODE_NAMED_SERVER);
scoped_ptr<IPC::Channel> channel( scoped_ptr<IPC::ChannelPosix> channel(new IPC::ChannelPosix(
IPC::Channel::CreateNamedServer(chan_handle, &listener)); chan_handle, IPC::Channel::MODE_NAMED_SERVER, &listener));
ASSERT_TRUE(channel->Connect()); ASSERT_TRUE(channel->Connect());
ASSERT_TRUE(channel->AcceptsConnections()); ASSERT_TRUE(channel->AcceptsConnections());
ASSERT_FALSE(channel->HasAcceptedConnection()); ASSERT_FALSE(channel->HasAcceptedConnection());
...@@ -413,10 +414,10 @@ TEST_F(IPCChannelPosixTest, DoubleServer) { ...@@ -413,10 +414,10 @@ TEST_F(IPCChannelPosixTest, DoubleServer) {
IPCChannelPosixTestListener listener(false); IPCChannelPosixTestListener listener(false);
IPCChannelPosixTestListener listener2(false); IPCChannelPosixTestListener listener2(false);
IPC::ChannelHandle chan_handle(GetConnectionSocketName()); IPC::ChannelHandle chan_handle(GetConnectionSocketName());
scoped_ptr<IPC::Channel> channel( scoped_ptr<IPC::ChannelPosix> channel(new IPC::ChannelPosix(
IPC::Channel::CreateServer(chan_handle, &listener)); chan_handle, IPC::Channel::MODE_SERVER, &listener));
scoped_ptr<IPC::Channel> channel2( scoped_ptr<IPC::ChannelPosix> channel2(new IPC::ChannelPosix(
IPC::Channel::CreateServer(chan_handle, &listener2)); chan_handle, IPC::Channel::MODE_SERVER, &listener2));
ASSERT_TRUE(channel->Connect()); ASSERT_TRUE(channel->Connect());
ASSERT_FALSE(channel2->Connect()); ASSERT_FALSE(channel2->Connect());
} }
...@@ -425,7 +426,7 @@ TEST_F(IPCChannelPosixTest, BadMode) { ...@@ -425,7 +426,7 @@ TEST_F(IPCChannelPosixTest, BadMode) {
// Test setting up two servers with a bad mode. // Test setting up two servers with a bad mode.
IPCChannelPosixTestListener listener(false); IPCChannelPosixTestListener listener(false);
IPC::ChannelHandle chan_handle(GetConnectionSocketName()); IPC::ChannelHandle chan_handle(GetConnectionSocketName());
scoped_ptr<IPC::Channel> channel(IPC::Channel::Create( scoped_ptr<IPC::ChannelPosix> channel(new IPC::ChannelPosix(
chan_handle, IPC::Channel::MODE_NONE, &listener)); chan_handle, IPC::Channel::MODE_NONE, &listener));
ASSERT_FALSE(channel->Connect()); ASSERT_FALSE(channel->Connect());
} }
...@@ -437,8 +438,8 @@ TEST_F(IPCChannelPosixTest, IsNamedServerInitialized) { ...@@ -437,8 +438,8 @@ TEST_F(IPCChannelPosixTest, IsNamedServerInitialized) {
ASSERT_TRUE(base::DeleteFile(base::FilePath(connection_socket_name), false)); ASSERT_TRUE(base::DeleteFile(base::FilePath(connection_socket_name), false));
ASSERT_FALSE(IPC::Channel::IsNamedServerInitialized( ASSERT_FALSE(IPC::Channel::IsNamedServerInitialized(
connection_socket_name)); connection_socket_name));
scoped_ptr<IPC::Channel> channel( scoped_ptr<IPC::ChannelPosix> channel(new IPC::ChannelPosix(
IPC::Channel::CreateNamedServer(chan_handle, &listener)); chan_handle, IPC::Channel::MODE_NAMED_SERVER, &listener));
ASSERT_TRUE(IPC::Channel::IsNamedServerInitialized( ASSERT_TRUE(IPC::Channel::IsNamedServerInitialized(
connection_socket_name)); connection_socket_name));
channel->Close(); channel->Close();
...@@ -452,8 +453,8 @@ MULTIPROCESS_TEST_MAIN(IPCChannelPosixTestConnectionProc) { ...@@ -452,8 +453,8 @@ MULTIPROCESS_TEST_MAIN(IPCChannelPosixTestConnectionProc) {
IPCChannelPosixTestListener listener(true); IPCChannelPosixTestListener listener(true);
IPC::ChannelHandle handle(IPCChannelPosixTest::GetConnectionSocketName()); IPC::ChannelHandle handle(IPCChannelPosixTest::GetConnectionSocketName());
IPCChannelPosixTest::SetUpSocket(&handle, IPC::Channel::MODE_NAMED_CLIENT); IPCChannelPosixTest::SetUpSocket(&handle, IPC::Channel::MODE_NAMED_CLIENT);
scoped_ptr<IPC::Channel> channel( scoped_ptr<IPC::ChannelPosix> channel(new IPC::ChannelPosix(
IPC::Channel::CreateNamedClient(handle, &listener)); handle, IPC::Channel::MODE_NAMED_CLIENT, &listener));
EXPECT_TRUE(channel->Connect()); EXPECT_TRUE(channel->Connect());
IPCChannelPosixTest::SpinRunLoop(TestTimeouts::action_max_timeout()); IPCChannelPosixTest::SpinRunLoop(TestTimeouts::action_max_timeout());
EXPECT_EQ(IPCChannelPosixTestListener::MESSAGE_RECEIVED, listener.status()); EXPECT_EQ(IPCChannelPosixTestListener::MESSAGE_RECEIVED, listener.status());
...@@ -466,8 +467,8 @@ MULTIPROCESS_TEST_MAIN(IPCChannelPosixFailConnectionProc) { ...@@ -466,8 +467,8 @@ MULTIPROCESS_TEST_MAIN(IPCChannelPosixFailConnectionProc) {
IPCChannelPosixTestListener listener(false); IPCChannelPosixTestListener listener(false);
IPC::ChannelHandle handle(IPCChannelPosixTest::GetConnectionSocketName()); IPC::ChannelHandle handle(IPCChannelPosixTest::GetConnectionSocketName());
IPCChannelPosixTest::SetUpSocket(&handle, IPC::Channel::MODE_NAMED_CLIENT); IPCChannelPosixTest::SetUpSocket(&handle, IPC::Channel::MODE_NAMED_CLIENT);
scoped_ptr<IPC::Channel> channel( scoped_ptr<IPC::ChannelPosix> channel(new IPC::ChannelPosix(
IPC::Channel::CreateNamedClient(handle, &listener)); handle, IPC::Channel::MODE_NAMED_CLIENT, &listener));
// In this case connect may succeed or fail depending on if the packet // In this case connect may succeed or fail depending on if the packet
// actually gets sent at sendmsg. Since we never delay on send, we may not // actually gets sent at sendmsg. Since we never delay on send, we may not
......
...@@ -436,15 +436,6 @@ int ChannelProxy::TakeClientFileDescriptor() { ...@@ -436,15 +436,6 @@ int ChannelProxy::TakeClientFileDescriptor() {
DCHECK(channel) << context_.get()->channel_id_; DCHECK(channel) << context_.get()->channel_id_;
return channel->TakeClientFileDescriptor(); return channel->TakeClientFileDescriptor();
} }
bool ChannelProxy::GetPeerEuid(uid_t* peer_euid) const {
DCHECK(CalledOnValidThread());
Channel* channel = context_.get()->channel_.get();
// Channel must have been created first.
DCHECK(channel) << context_.get()->channel_id_;
return channel->GetPeerEuid(peer_euid);
}
#endif #endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
......
...@@ -116,7 +116,6 @@ class IPC_EXPORT ChannelProxy : public Sender, public base::NonThreadSafe { ...@@ -116,7 +116,6 @@ class IPC_EXPORT ChannelProxy : public Sender, public base::NonThreadSafe {
// Calls through to the underlying channel's methods. // Calls through to the underlying channel's methods.
int GetClientFileDescriptor(); int GetClientFileDescriptor();
int TakeClientFileDescriptor(); int TakeClientFileDescriptor();
bool GetPeerEuid(uid_t* peer_euid) const;
#endif // defined(OS_POSIX) #endif // defined(OS_POSIX)
protected: protected:
......
...@@ -101,25 +101,6 @@ int TestSink::TakeClientFileDescriptor() { ...@@ -101,25 +101,6 @@ int TestSink::TakeClientFileDescriptor() {
return -1; 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) #endif // defined(OS_POSIX) && !defined(OS_NACL)
} // namespace IPC } // namespace IPC
...@@ -85,10 +85,6 @@ class TestSink : public Channel { ...@@ -85,10 +85,6 @@ class TestSink : public Channel {
#if defined(OS_POSIX) && !defined(OS_NACL) #if defined(OS_POSIX) && !defined(OS_NACL)
virtual int GetClientFileDescriptor() const OVERRIDE; virtual int GetClientFileDescriptor() const OVERRIDE;
virtual int TakeClientFileDescriptor() OVERRIDE; virtual int TakeClientFileDescriptor() OVERRIDE;
virtual bool AcceptsConnections() const OVERRIDE;
virtual bool HasAcceptedConnection() const OVERRIDE;
virtual bool GetPeerEuid(uid_t* peer_euid) const OVERRIDE;
virtual void ResetToAcceptingConnectionState() OVERRIDE;
#endif // defined(OS_POSIX) && !defined(OS_NACL) #endif // defined(OS_POSIX) && !defined(OS_NACL)
// Used by the source of the messages to send the message to the sink. This // Used by the source of the messages to send the message to the sink. This
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment