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

Unified Diff: base/threading/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/thread_perftest.cc ('k') | base/threading/watchdog.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/thread_unittest.cc
diff --git a/base/threading/thread_unittest.cc b/base/threading/thread_unittest.cc
index 2bac84a697cd8c4ab4adc29f66c2be74cdbc97d7..f3fb3343e9a360c70108cfa7cce11e57f773a9ae 100644
--- a/base/threading/thread_unittest.cc
+++ b/base/threading/thread_unittest.cc
@@ -31,11 +31,9 @@ class SleepInsideInitThread : public Thread {
ANNOTATE_BENIGN_RACE(
this, "Benign test-only data race on vptr - http://crbug.com/98219");
}
- virtual ~SleepInsideInitThread() {
- Stop();
- }
+ ~SleepInsideInitThread() override { Stop(); }
- virtual void Init() override {
+ void Init() override {
base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(500));
init_called_ = true;
}
@@ -70,17 +68,11 @@ class CaptureToEventList : public Thread {
event_list_(event_list) {
}
- virtual ~CaptureToEventList() {
- Stop();
- }
+ ~CaptureToEventList() override { Stop(); }
- virtual void Init() override {
- event_list_->push_back(THREAD_EVENT_INIT);
- }
+ void Init() override { event_list_->push_back(THREAD_EVENT_INIT); }
- virtual void CleanUp() override {
- event_list_->push_back(THREAD_EVENT_CLEANUP);
- }
+ void CleanUp() override { event_list_->push_back(THREAD_EVENT_CLEANUP); }
private:
EventList* event_list_;
@@ -97,7 +89,7 @@ class CapturingDestructionObserver
}
// DestructionObserver implementation:
- virtual void WillDestroyCurrentMessageLoop() override {
+ void WillDestroyCurrentMessageLoop() override {
event_list_->push_back(THREAD_EVENT_MESSAGE_LOOP_DESTROYED);
event_list_ = NULL;
}
« no previous file with comments | « base/threading/thread_perftest.cc ('k') | base/threading/watchdog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698