Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(417)

Unified Diff: base/threading/simple_thread_unittest.cc

Issue 668783004: Standardize usage of virtual/override/final in base/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatted Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/threading/simple_thread.h ('k') | base/threading/thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/simple_thread_unittest.cc
diff --git a/base/threading/simple_thread_unittest.cc b/base/threading/simple_thread_unittest.cc
index 89ddeba635b2c7cb76d75b0eda7cd03a624018df..7229d362f142ec082a76645992f5c1ae1385c116 100644
--- a/base/threading/simple_thread_unittest.cc
+++ b/base/threading/simple_thread_unittest.cc
@@ -15,11 +15,9 @@ namespace {
class SetIntRunner : public DelegateSimpleThread::Delegate {
public:
SetIntRunner(int* ptr, int val) : ptr_(ptr), val_(val) { }
- virtual ~SetIntRunner() { }
+ ~SetIntRunner() override {}
- virtual void Run() override {
- *ptr_ = val_;
- }
+ void Run() override { *ptr_ = val_; }
private:
int* ptr_;
@@ -29,9 +27,9 @@ class SetIntRunner : public DelegateSimpleThread::Delegate {
class WaitEventRunner : public DelegateSimpleThread::Delegate {
public:
explicit WaitEventRunner(WaitableEvent* event) : event_(event) { }
- virtual ~WaitEventRunner() { }
+ ~WaitEventRunner() override {}
- virtual void Run() override {
+ void Run() override {
EXPECT_FALSE(event_->IsSignaled());
event_->Signal();
EXPECT_TRUE(event_->IsSignaled());
@@ -43,9 +41,7 @@ class WaitEventRunner : public DelegateSimpleThread::Delegate {
class SeqRunner : public DelegateSimpleThread::Delegate {
public:
explicit SeqRunner(AtomicSequenceNumber* seq) : seq_(seq) { }
- virtual void Run() override {
- seq_->GetNext();
- }
+ void Run() override { seq_->GetNext(); }
private:
AtomicSequenceNumber* seq_;
@@ -60,7 +56,7 @@ class VerifyPoolRunner : public DelegateSimpleThread::Delegate {
int total, WaitableEvent* event)
: seq_(seq), total_(total), event_(event) { }
- virtual void Run() override {
+ void Run() override {
if (seq_->GetNext() == total_) {
event_->Signal();
} else {
« no previous file with comments | « base/threading/simple_thread.h ('k') | base/threading/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698