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

Unified Diff: ipc/ipc_channel_proxy_unittest.cc

Issue 666493005: Standardize usage of virtual/override/final in ipc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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_proxy.h ('k') | ipc/ipc_channel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_proxy_unittest.cc
diff --git a/ipc/ipc_channel_proxy_unittest.cc b/ipc/ipc_channel_proxy_unittest.cc
index 9042f44d3f7ee96a5e808d07106a9c562072b1fb..848367ec782bd2e481d7b3deba85b8b916ae09a0 100644
--- a/ipc/ipc_channel_proxy_unittest.cc
+++ b/ipc/ipc_channel_proxy_unittest.cc
@@ -47,9 +47,9 @@ namespace {
class QuitListener : public IPC::Listener {
public:
QuitListener() : bad_message_received_(false) {}
- virtual ~QuitListener() {}
+ ~QuitListener() override {}
- virtual bool OnMessageReceived(const IPC::Message& message) override {
+ bool OnMessageReceived(const IPC::Message& message) override {
IPC_BEGIN_MESSAGE_MAP(QuitListener, message)
IPC_MESSAGE_HANDLER(WorkerMsg_Quit, OnQuit)
IPC_MESSAGE_HANDLER(TestMsg_BadMessage, OnBadMessage)
@@ -57,7 +57,7 @@ class QuitListener : public IPC::Listener {
return true;
}
- virtual void OnBadMessageReceived(const IPC::Message& message) override {
+ void OnBadMessageReceived(const IPC::Message& message) override {
bad_message_received_ = true;
}
@@ -76,14 +76,14 @@ class QuitListener : public IPC::Listener {
class ChannelReflectorListener : public IPC::Listener {
public:
ChannelReflectorListener() : channel_(NULL) {}
- virtual ~ChannelReflectorListener() {}
+ ~ChannelReflectorListener() override {}
void Init(IPC::Channel* channel) {
DCHECK(!channel_);
channel_ = channel;
}
- virtual bool OnMessageReceived(const IPC::Message& message) override {
+ bool OnMessageReceived(const IPC::Message& message) override {
IPC_BEGIN_MESSAGE_MAP(ChannelReflectorListener, message)
IPC_MESSAGE_HANDLER(TestMsg_Bounce, OnTestBounce)
IPC_MESSAGE_HANDLER(TestMsg_SendBadMessage, OnSendBadMessage)
@@ -143,24 +143,24 @@ class MessageCountFilter : public IPC::MessageFilter {
last_filter_event_(NONE),
message_filtering_enabled_(false) {}
- virtual void OnFilterAdded(IPC::Sender* sender) override {
+ void OnFilterAdded(IPC::Sender* sender) override {
EXPECT_TRUE(sender);
EXPECT_EQ(NONE, last_filter_event_);
last_filter_event_ = FILTER_ADDED;
}
- virtual void OnChannelConnected(int32_t peer_pid) override {
+ void OnChannelConnected(int32_t peer_pid) override {
EXPECT_EQ(FILTER_ADDED, last_filter_event_);
EXPECT_NE(static_cast<int32_t>(base::kNullProcessId), peer_pid);
last_filter_event_ = CHANNEL_CONNECTED;
}
- virtual void OnChannelError() override {
+ void OnChannelError() override {
EXPECT_EQ(CHANNEL_CONNECTED, last_filter_event_);
last_filter_event_ = CHANNEL_ERROR;
}
- virtual void OnChannelClosing() override {
+ void OnChannelClosing() override {
// We may or may not have gotten OnChannelError; if not, the last event has
// to be OnChannelConnected.
if (last_filter_event_ != CHANNEL_ERROR)
@@ -168,7 +168,7 @@ class MessageCountFilter : public IPC::MessageFilter {
last_filter_event_ = CHANNEL_CLOSING;
}
- virtual void OnFilterRemoved() override {
+ void OnFilterRemoved() override {
// If the channel didn't get a chance to connect, we might see the
// OnFilterRemoved event with no other events preceding it. We still want
// OnFilterRemoved to be called to allow for deleting the Filter.
@@ -177,7 +177,7 @@ class MessageCountFilter : public IPC::MessageFilter {
last_filter_event_ = FILTER_REMOVED;
}
- virtual bool OnMessageReceived(const IPC::Message& message) override {
+ bool OnMessageReceived(const IPC::Message& message) override {
// We should always get the OnFilterAdded and OnChannelConnected events
// prior to any messages.
EXPECT_EQ(CHANNEL_CONNECTED, last_filter_event_);
@@ -203,7 +203,7 @@ class MessageCountFilter : public IPC::MessageFilter {
CHECK(false);
}
- virtual bool GetSupportedMessageClasses(
+ bool GetSupportedMessageClasses(
std::vector<uint32>* supported_message_classes) const override {
if (is_global_filter_)
return false;
@@ -219,7 +219,7 @@ class MessageCountFilter : public IPC::MessageFilter {
FilterEvent last_filter_event() const { return last_filter_event_; }
private:
- virtual ~MessageCountFilter() {}
+ ~MessageCountFilter() override {}
size_t messages_received_;
uint32 supported_message_class_;
« no previous file with comments | « ipc/ipc_channel_proxy.h ('k') | ipc/ipc_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698