diff options
author | dcheng <dcheng@chromium.org> | 2014-10-27 14:43:14 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-27 21:43:44 +0000 |
commit | f9afb370f94e325015aa8633135474f87aa5eb76 (patch) | |
tree | 4688f718dc5af753297b11f3e765c08e248a3098 /extensions/renderer/api | |
parent | 1d5884e1c15b36604a9c9f9376d18cb91f345f47 (diff) | |
download | chromium_src-f9afb370f94e325015aa8633135474f87aa5eb76.zip chromium_src-f9afb370f94e325015aa8633135474f87aa5eb76.tar.gz chromium_src-f9afb370f94e325015aa8633135474f87aa5eb76.tar.bz2 |
Standardize usage of virtual/override/final specifiers.
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
R=jyasskin@chromium.org
Review URL: https://codereview.chromium.org/685503002
Cr-Commit-Position: refs/heads/master@{#301450}
Diffstat (limited to 'extensions/renderer/api')
-rw-r--r-- | extensions/renderer/api/serial/data_receiver_unittest.cc | 4 | ||||
-rw-r--r-- | extensions/renderer/api/serial/data_sender_unittest.cc | 4 | ||||
-rw-r--r-- | extensions/renderer/api/serial/serial_api_unittest.cc | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/extensions/renderer/api/serial/data_receiver_unittest.cc b/extensions/renderer/api/serial/data_receiver_unittest.cc index 2415e00..381e361 100644 --- a/extensions/renderer/api/serial/data_receiver_unittest.cc +++ b/extensions/renderer/api/serial/data_receiver_unittest.cc @@ -16,7 +16,7 @@ class DataReceiverTest : public ApiTestBase { public: DataReceiverTest() {} - virtual void SetUp() override { + void SetUp() override { ApiTestBase::SetUp(); env()->RegisterModule("async_waiter", IDR_ASYNC_WAITER_JS); env()->RegisterModule("data_receiver", IDR_DATA_RECEIVER_JS); @@ -28,7 +28,7 @@ class DataReceiverTest : public ApiTestBase { &DataReceiverTest::CreateDataSource, base::Unretained(this))); } - virtual void TearDown() override { + void TearDown() override { if (sender_.get()) { sender_->ShutDown(); sender_ = NULL; diff --git a/extensions/renderer/api/serial/data_sender_unittest.cc b/extensions/renderer/api/serial/data_sender_unittest.cc index 77dcfe1..eac7e41c 100644 --- a/extensions/renderer/api/serial/data_sender_unittest.cc +++ b/extensions/renderer/api/serial/data_sender_unittest.cc @@ -16,7 +16,7 @@ class DataSenderTest : public ApiTestBase { public: DataSenderTest() {} - virtual void SetUp() override { + void SetUp() override { ApiTestBase::SetUp(); env()->RegisterModule("async_waiter", IDR_ASYNC_WAITER_JS); env()->RegisterModule("data_sender", IDR_DATA_SENDER_JS); @@ -28,7 +28,7 @@ class DataSenderTest : public ApiTestBase { base::Bind(&DataSenderTest::CreateDataSink, base::Unretained(this))); } - virtual void TearDown() override { + void TearDown() override { if (receiver_.get()) { receiver_->ShutDown(); receiver_ = NULL; diff --git a/extensions/renderer/api/serial/serial_api_unittest.cc b/extensions/renderer/api/serial/serial_api_unittest.cc index 9a07cd7..31362eb 100644 --- a/extensions/renderer/api/serial/serial_api_unittest.cc +++ b/extensions/renderer/api/serial/serial_api_unittest.cc @@ -394,7 +394,7 @@ class SerialApiTest : public ApiTestBase { public: SerialApiTest() {} - virtual void SetUp() override { + void SetUp() override { ApiTestBase::SetUp(); env()->RegisterModule("async_waiter", IDR_ASYNC_WAITER_JS); env()->RegisterModule("data_receiver", IDR_DATA_RECEIVER_JS); |