summaryrefslogtreecommitdiffstats
path: root/device/hid/hid_service.cc
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2014-10-22 16:07:52 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-22 23:08:15 +0000
commitb5aaf402eb4783b9f62de3ae8485edec343866cc (patch)
treee9f30bd26479007ce31da6833f81743109eba9b4 /device/hid/hid_service.cc
parent9cee6105930e94ad2abf2c004efb1d65c0759a0f (diff)
downloadchromium_src-b5aaf402eb4783b9f62de3ae8485edec343866cc.zip
chromium_src-b5aaf402eb4783b9f62de3ae8485edec343866cc.tar.gz
chromium_src-b5aaf402eb4783b9f62de3ae8485edec343866cc.tar.bz2
Standardize usage of virtual/override/final in device/
The Google C++ style guide states: Explicitly annotate overrides of virtual functions or virtual destructors with an override or (less frequently) final specifier. Older (pre-C++11) code will use the virtual keyword as an inferior alternative annotation. For clarity, use exactly one of override, final, or virtual when declaring an override. To better conform to these guidelines, the following constructs have been rewritten: - if a base class has a virtual destructor, then: virtual ~Foo(); -> ~Foo() override; - virtual void Foo() override; -> void Foo() override; - virtual void Foo() override final; -> void Foo() final; This patch was automatically generated. The clang plugin can generate fixit hints, which are suggested edits when it is 100% sure it knows how to fix a problem. The hints from the clang plugin were applied to the source tree using the tool in https://codereview.chromium.org/598073004. BUG=417463 TBR=keybuk@chromium.org Review URL: https://codereview.chromium.org/663203007 Cr-Commit-Position: refs/heads/master@{#300790}
Diffstat (limited to 'device/hid/hid_service.cc')
-rw-r--r--device/hid/hid_service.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/device/hid/hid_service.cc b/device/hid/hid_service.cc
index 12ea582..d2ccaa3 100644
--- a/device/hid/hid_service.cc
+++ b/device/hid/hid_service.cc
@@ -30,11 +30,11 @@ class HidService::Destroyer : public base::MessageLoop::DestructionObserver {
public:
explicit Destroyer(HidService* hid_service)
: hid_service_(hid_service) {}
- virtual ~Destroyer() {}
+ ~Destroyer() override {}
private:
// base::MessageLoop::DestructionObserver implementation.
- virtual void WillDestroyCurrentMessageLoop() override {
+ void WillDestroyCurrentMessageLoop() override {
base::MessageLoop::current()->RemoveDestructionObserver(this);
delete hid_service_;
delete this;