Skip to content

Commit

Permalink
Chrome style plugin: enable virtual specifier checks for Gmock object…
Browse files Browse the repository at this point in the history
…s in //services

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 //services.

Bug: 837148
Change-Id: I5b60e5a997940cfc33f6cad2c90f7895eec41fac
Reviewed-on: https://chromium-review.googlesource.com/1031177
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554148}
  • Loading branch information
zetafunction authored and Commit Bot committed Apr 26, 2018
1 parent b8aedbd commit 90eaf58
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion services/audio/input_stream_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class AudioServiceInputStreamTest : public testing::Test {
stream_factory_binding_(&stream_factory_,
mojo::MakeRequest(&stream_factory_ptr_)) {}

~AudioServiceInputStreamTest() { audio_manager_.Shutdown(); }
~AudioServiceInputStreamTest() override { audio_manager_.Shutdown(); }

void SetUp() override {
mojo::edk::SetDefaultProcessErrorCallback(
Expand Down
2 changes: 1 addition & 1 deletion services/audio/output_controller_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class MockOutputControllerEventHandler : public OutputController::EventHandler {
MOCK_METHOD0(OnControllerPlaying, void());
MOCK_METHOD0(OnControllerPaused, void());
MOCK_METHOD0(OnControllerError, void());
void OnLog(base::StringPiece) {}
void OnLog(base::StringPiece) override {}

private:
DISALLOW_COPY_AND_ASSIGN(MockOutputControllerEventHandler);
Expand Down
2 changes: 1 addition & 1 deletion services/preferences/unittest_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ constexpr char kOtherDictionaryKey[] = "another.dictionary.pref";
class PrefStoreObserverMock : public PrefStore::Observer {
public:
PrefStoreObserverMock();
~PrefStoreObserverMock();
~PrefStoreObserverMock() override;
MOCK_METHOD1(OnPrefValueChanged, void(const std::string&));
MOCK_METHOD1(OnInitializationCompleted, void(bool));
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,17 +192,18 @@ class MockClientProcess : public mojom::ClientProcess {
void(base::trace_event::HeapProfilingMode mode,
EnableHeapProfilingCallback& callback));

void RequestChromeMemoryDump(const MemoryDumpRequestArgs& args,
RequestChromeMemoryDumpCallback callback) {
void RequestChromeMemoryDump(
const MemoryDumpRequestArgs& args,
RequestChromeMemoryDumpCallback callback) override {
RequestChromeMemoryDumpMock(args, callback);
}
void RequestOSMemoryDump(mojom::MemoryMapOption option,
const std::vector<base::ProcessId>& args,
RequestOSMemoryDumpCallback callback) {
RequestOSMemoryDumpCallback callback) override {
RequestOSMemoryDumpMock(option, args, callback);
}
void EnableHeapProfiling(base::trace_event::HeapProfilingMode mode,
EnableHeapProfilingCallback callback) {
EnableHeapProfilingCallback callback) override {
EnableHeapProfilingMock(mode, callback);
}

Expand Down

0 comments on commit 90eaf58

Please sign in to comment.