summaryrefslogtreecommitdiffstats
path: root/components/nacl/browser
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2014-10-29 14:27:50 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-29 21:28:20 +0000
commit30a1b15432dd20cf910f96ec35e27a94f769640e (patch)
treec9f5ffdb5c802fe2a26a22d499b700b49fe8f509 /components/nacl/browser
parent6913b7737d6124633109d6e3da31689d7ffef838 (diff)
downloadchromium_src-30a1b15432dd20cf910f96ec35e27a94f769640e.zip
chromium_src-30a1b15432dd20cf910f96ec35e27a94f769640e.tar.gz
chromium_src-30a1b15432dd20cf910f96ec35e27a94f769640e.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=caitkp@chromium.org Review URL: https://codereview.chromium.org/684513002 Cr-Commit-Position: refs/heads/master@{#301931}
Diffstat (limited to 'components/nacl/browser')
-rw-r--r--components/nacl/browser/nacl_file_host_unittest.cc6
-rw-r--r--components/nacl/browser/nacl_validation_cache_unittest.cc2
-rw-r--r--components/nacl/browser/pnacl_host_unittest.cc6
-rw-r--r--components/nacl/browser/pnacl_translation_cache_unittest.cc6
4 files changed, 10 insertions, 10 deletions
diff --git a/components/nacl/browser/nacl_file_host_unittest.cc b/components/nacl/browser/nacl_file_host_unittest.cc
index 292ac46..89f726c 100644
--- a/components/nacl/browser/nacl_file_host_unittest.cc
+++ b/components/nacl/browser/nacl_file_host_unittest.cc
@@ -35,14 +35,14 @@ class FileHostTestNaClBrowserDelegate : public TestNaClBrowserDelegate {
class NaClFileHostTest : public testing::Test {
protected:
NaClFileHostTest();
- virtual ~NaClFileHostTest();
+ ~NaClFileHostTest() override;
- virtual void SetUp() override {
+ void SetUp() override {
nacl_browser_delegate_ = new FileHostTestNaClBrowserDelegate;
nacl::NaClBrowser::SetDelegate(nacl_browser_delegate_);
}
- virtual void TearDown() override {
+ void TearDown() override {
// This deletes nacl_browser_delegate_.
nacl::NaClBrowser::SetDelegate(NULL);
}
diff --git a/components/nacl/browser/nacl_validation_cache_unittest.cc b/components/nacl/browser/nacl_validation_cache_unittest.cc
index 3b52ca7..945db2f 100644
--- a/components/nacl/browser/nacl_validation_cache_unittest.cc
+++ b/components/nacl/browser/nacl_validation_cache_unittest.cc
@@ -20,7 +20,7 @@ class NaClValidationCacheTest : public ::testing::Test {
NaClValidationCache cache1;
NaClValidationCache cache2;
- virtual void SetUp() {
+ void SetUp() override {
// The compiler chokes if std::string(key1) is passed directly as an arg.
std::string key(key1);
cache1.SetValidationCacheKey(key);
diff --git a/components/nacl/browser/pnacl_host_unittest.cc b/components/nacl/browser/pnacl_host_unittest.cc
index 8326932..3f2d3ef 100644
--- a/components/nacl/browser/pnacl_host_unittest.cc
+++ b/components/nacl/browser/pnacl_host_unittest.cc
@@ -37,14 +37,14 @@ class PnaclHostTest : public testing::Test {
temp_callback_count_(0),
write_callback_count_(0),
thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
- virtual void SetUp() {
+ void SetUp() override {
host_ = new PnaclHost();
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
host_->InitForTest(temp_dir_.path(), true);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(PnaclHost::CacheReady, host_->cache_state_);
}
- virtual void TearDown() {
+ void TearDown() override {
EXPECT_EQ(0U, host_->pending_translations());
// Give the host a chance to de-init the backend, and then delete it.
host_->RendererClosing(0);
@@ -436,7 +436,7 @@ TEST_F(PnaclHostTest, ClearTranslationCache) {
// A version of PnaclHostTest that initializes cache on disk.
class PnaclHostTestDisk : public PnaclHostTest {
protected:
- virtual void SetUp() {
+ void SetUp() override {
host_ = new PnaclHost();
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
host_->InitForTest(temp_dir_.path(), false);
diff --git a/components/nacl/browser/pnacl_translation_cache_unittest.cc b/components/nacl/browser/pnacl_translation_cache_unittest.cc
index 98cfbe7..bfc3052 100644
--- a/components/nacl/browser/pnacl_translation_cache_unittest.cc
+++ b/components/nacl/browser/pnacl_translation_cache_unittest.cc
@@ -26,9 +26,9 @@ class PnaclTranslationCacheTest : public testing::Test {
protected:
PnaclTranslationCacheTest()
: thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
- virtual ~PnaclTranslationCacheTest() {}
- virtual void SetUp() { cache_.reset(new PnaclTranslationCache()); }
- virtual void TearDown() {
+ ~PnaclTranslationCacheTest() override {}
+ void SetUp() override { cache_.reset(new PnaclTranslationCache()); }
+ void TearDown() override {
// The destructor of PnaclTranslationCacheWriteEntry posts a task to the IO
// thread to close the backend cache entry. We want to make sure the entries
// are closed before we delete the backend (and in particular the destructor