Fix -Winconsistent-missing-override in fake_network.h.

This violation survived -Winconsistent-missing-override because gmock
suppresses this diagnostic using "public_configs" [1] and since
"rtc_base/fake_network.h" is only #included in test code, it was not
possible for the compiler to complain about it.

[1] - https://cs.chromium.org/chromium/src/third_party/googletest/BUILD.gn?l=57&rcl=6c7458dd455ec9e301dc7eb4a15953c81cc7eb40

Bug: None
Change-Id: I3c8cf0800cab059009808b24de2fbd27cea3041c
Reviewed-on: https://webrtc-review.googlesource.com/c/125183
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26937}
This commit is contained in:
Mirko Bonadei 2019-03-01 15:20:35 +01:00 committed by Commit Bot
parent c9ea5451bf
commit 1916cbc6c5

View File

@ -65,7 +65,7 @@ class FakeNetworkManager : public NetworkManagerBase, public MessageHandler {
DoUpdateNetworks();
}
virtual void StartUpdating() {
void StartUpdating() override {
++start_count_;
if (start_count_ == 1) {
sent_first_update_ = false;
@ -77,10 +77,10 @@ class FakeNetworkManager : public NetworkManagerBase, public MessageHandler {
}
}
virtual void StopUpdating() { --start_count_; }
void StopUpdating() override { --start_count_; }
// MessageHandler interface.
virtual void OnMessage(Message* msg) { DoUpdateNetworks(); }
void OnMessage(Message* msg) override { DoUpdateNetworks(); }
void CreateMdnsResponder(rtc::Thread* network_thread) {
if (mdns_responder_ == nullptr) {