summaryrefslogtreecommitdiffstats
path: root/google_apis/google_api_keys_unittest.cc
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2014-12-22 17:34:08 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-23 01:35:03 +0000
commit00742d0a34d5aae0f59baedc1173702f22d2aeae (patch)
tree9d3db372b251fba4aa90bc77ad31b352ea31cb83 /google_apis/google_api_keys_unittest.cc
parent19c1d109fa46723cc3844acfaf2631fa7ed11d19 (diff)
downloadchromium_src-00742d0a34d5aae0f59baedc1173702f22d2aeae.zip
chromium_src-00742d0a34d5aae0f59baedc1173702f22d2aeae.tar.gz
chromium_src-00742d0a34d5aae0f59baedc1173702f22d2aeae.tar.bz2
Standardize usage of virtual/override/final specifiers in google_apis/.
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. Several formatting edits by clang-format were manually reverted, due to mangling of some of the more complicate IPC macros. BUG=417463 TBR=rogerta@chromoium.org Review URL: https://codereview.chromium.org/802413003 Cr-Commit-Position: refs/heads/master@{#309513}
Diffstat (limited to 'google_apis/google_api_keys_unittest.cc')
-rw-r--r--google_apis/google_api_keys_unittest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/google_apis/google_api_keys_unittest.cc b/google_apis/google_api_keys_unittest.cc
index e18cff5..e889179 100644
--- a/google_apis/google_api_keys_unittest.cc
+++ b/google_apis/google_api_keys_unittest.cc
@@ -66,7 +66,7 @@ class GoogleAPIKeysTest : public testing::Test {
env_cache_[10].variable_name = "GOOGLE_DEFAULT_CLIENT_SECRET";
}
- virtual void SetUp() {
+ void SetUp() override {
// Unset all environment variables that can affect these tests,
// for the duration of the tests.
for (size_t i = 0; i < arraysize(env_cache_); ++i) {
@@ -80,7 +80,7 @@ class GoogleAPIKeysTest : public testing::Test {
}
}
- virtual void TearDown() {
+ void TearDown() override {
// Restore environment.
for (size_t i = 0; i < arraysize(env_cache_); ++i) {
EnvironmentCache& cache = env_cache_[i];