Chrome style plugin: enable virtual specifier checks for Gmock objects in //components
Previously, the plugin completely skipped virtual specifier checks on
Gmock objects since it wasn't smart enough to filter out warnings caused
by Gmock macros. In preparation for making the plugin smarter, this CL
fixes existing virtual specifier warnings in //components.
[email protected]
Bug: 837148
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel
Change-Id: I14f72dd481c02acdc8ea35d58d9fb4801140d353
Reviewed-on: https://chromium-review.googlesource.com/1031090
Commit-Queue: Daniel Cheng <[email protected]>
Reviewed-by: Jochen Eisinger <[email protected]>
Cr-Commit-Position: refs/heads/master@{#554524}
diff --git a/components/prefs/pref_change_registrar_unittest.cc b/components/prefs/pref_change_registrar_unittest.cc
index 5cfaa2b..b02b13a5 100644
--- a/components/prefs/pref_change_registrar_unittest.cc
+++ b/components/prefs/pref_change_registrar_unittest.cc
@@ -28,7 +28,7 @@
class MockPrefService : public TestingPrefServiceSimple {
public:
MockPrefService() {}
- virtual ~MockPrefService() {}
+ ~MockPrefService() override {}
MOCK_METHOD2(AddPrefObserver, void(const std::string&, PrefObserver*));
MOCK_METHOD2(RemovePrefObserver, void(const std::string&, PrefObserver*));
@@ -126,7 +126,7 @@
class ObserveSetOfPreferencesTest : public testing::Test {
public:
- virtual void SetUp() {
+ void SetUp() override {
pref_service_.reset(new TestingPrefServiceSimple);
PrefRegistrySimple* registry = pref_service_->registry();
registry->RegisterStringPref(kHomePage, "http://google.com");
diff --git a/components/prefs/pref_notifier_impl_unittest.cc b/components/prefs/pref_notifier_impl_unittest.cc
index 06ab053..a76c933 100644
--- a/components/prefs/pref_notifier_impl_unittest.cc
+++ b/components/prefs/pref_notifier_impl_unittest.cc
@@ -49,7 +49,7 @@
public:
explicit MockPrefNotifier(PrefService* pref_service)
: PrefNotifierImpl(pref_service) {}
- virtual ~MockPrefNotifier() {}
+ ~MockPrefNotifier() override {}
MOCK_METHOD1(FireObservers, void(const std::string& path));