Index: ipc/mojo/ipc_channel_mojo_unittest.cc |
diff --git a/ipc/mojo/ipc_channel_mojo_unittest.cc b/ipc/mojo/ipc_channel_mojo_unittest.cc |
index 1697ff70838b5e2983d62fb04fa0b1eef6595b39..cefa29e08af85d1172b41e906529547e9be7c031 100644 |
--- a/ipc/mojo/ipc_channel_mojo_unittest.cc |
+++ b/ipc/mojo/ipc_channel_mojo_unittest.cc |
@@ -27,9 +27,9 @@ |
ListenerThatExpectsOK() |
: received_ok_(false) {} |
- ~ListenerThatExpectsOK() override {} |
- |
- bool OnMessageReceived(const IPC::Message& message) override { |
+ virtual ~ListenerThatExpectsOK() {} |
+ |
+ virtual bool OnMessageReceived(const IPC::Message& message) override { |
PickleIterator iter(message); |
std::string should_be_ok; |
EXPECT_TRUE(iter.ReadString(&should_be_ok)); |
@@ -39,7 +39,7 @@ |
return true; |
} |
- void OnChannelError() override { |
+ virtual void OnChannelError() override { |
// The connection should be healthy while the listener is waiting |
// message. An error can occur after that because the peer |
// process dies. |
@@ -79,7 +79,7 @@ |
class IPCChannelMojoTest : public IPCTestBase { |
protected: |
- scoped_ptr<IPC::ChannelFactory> CreateChannelFactory( |
+ virtual scoped_ptr<IPC::ChannelFactory> CreateChannelFactory( |
const IPC::ChannelHandle& handle, |
base::TaskRunner* runner) override { |
host_.reset(new IPC::ChannelMojoHost(task_runner())); |
@@ -87,7 +87,7 @@ |
handle); |
} |
- bool DidStartClient() override { |
+ virtual bool DidStartClient() override { |
bool ok = IPCTestBase::DidStartClient(); |
DCHECK(ok); |
host_->OnClientLaunched(client_process()); |
@@ -106,7 +106,7 @@ |
: is_connected_called_(false) { |
} |
- void OnChannelConnected(int32 peer_pid) override { |
+ virtual void OnChannelConnected(int32 peer_pid) override { |
IPC::TestChannelListener::OnChannelConnected(peer_pid); |
EXPECT_TRUE(base::kNullProcessId != peer_pid); |
is_connected_called_ = true; |
@@ -165,13 +165,15 @@ |
: has_error_(false) { |
} |
- void OnChannelConnected(int32 peer_pid) override { |
+ virtual void OnChannelConnected(int32 peer_pid) override { |
base::MessageLoop::current()->Quit(); |
} |
- bool OnMessageReceived(const IPC::Message& message) override { return true; } |
- |
- void OnChannelError() override { |
+ virtual bool OnMessageReceived(const IPC::Message& message) override { |
+ return true; |
+ } |
+ |
+ virtual void OnChannelError() override { |
has_error_ = true; |
base::MessageLoop::current()->Quit(); |
} |
@@ -185,7 +187,7 @@ |
class IPCChannelMojoErrorTest : public IPCTestBase { |
protected: |
- scoped_ptr<IPC::ChannelFactory> CreateChannelFactory( |
+ virtual scoped_ptr<IPC::ChannelFactory> CreateChannelFactory( |
const IPC::ChannelHandle& handle, |
base::TaskRunner* runner) override { |
host_.reset(new IPC::ChannelMojoHost(task_runner())); |
@@ -193,7 +195,7 @@ |
handle); |
} |
- bool DidStartClient() override { |
+ virtual bool DidStartClient() override { |
bool ok = IPCTestBase::DidStartClient(); |
DCHECK(ok); |
host_->OnClientLaunched(client_process()); |
@@ -209,9 +211,11 @@ |
ListenerThatQuits() { |
} |
- bool OnMessageReceived(const IPC::Message& message) override { return true; } |
- |
- void OnChannelConnected(int32 peer_pid) override { |
+ virtual bool OnMessageReceived(const IPC::Message& message) override { |
+ return true; |
+ } |
+ |
+ virtual void OnChannelConnected(int32 peer_pid) override { |
base::MessageLoop::current()->Quit(); |
} |
}; |
@@ -320,9 +324,9 @@ |
ListenerThatExpectsFile() |
: sender_(NULL) {} |
- ~ListenerThatExpectsFile() override {} |
- |
- bool OnMessageReceived(const IPC::Message& message) override { |
+ virtual ~ListenerThatExpectsFile() {} |
+ |
+ virtual bool OnMessageReceived(const IPC::Message& message) override { |
PickleIterator iter(message); |
base::ScopedFD fd; |
@@ -336,7 +340,9 @@ |
return true; |
} |
- void OnChannelError() override { NOTREACHED(); } |
+ virtual void OnChannelError() override { |
+ NOTREACHED(); |
+ } |
static std::string GetSendingFileContent() { |
return "Hello"; |