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

Unified Diff: net/base/net_log_unittest.cc

Issue 667923003: Standardize usage of virtual/override/final in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « net/base/net_log_logger.h ('k') | net/base/net_util_icu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_log_unittest.cc
diff --git a/net/base/net_log_unittest.cc b/net/base/net_log_unittest.cc
index d1e7ddea8029aeb145fbce0bc5f65e683c4ade54..0f5b0ebf46c9e3515009838276ec5f613e1275e7 100644
--- a/net/base/net_log_unittest.cc
+++ b/net/base/net_log_unittest.cc
@@ -75,14 +75,12 @@ class CountingObserver : public NetLog::ThreadSafeObserver {
public:
CountingObserver() : count_(0) {}
- virtual ~CountingObserver() {
+ ~CountingObserver() override {
if (net_log())
net_log()->RemoveThreadSafeObserver(this);
}
- virtual void OnAddEntry(const NetLog::Entry& entry) override {
- ++count_;
- }
+ void OnAddEntry(const NetLog::Entry& entry) override { ++count_; }
int count() const { return count_; }
@@ -94,12 +92,12 @@ class LoggingObserver : public NetLog::ThreadSafeObserver {
public:
LoggingObserver() {}
- virtual ~LoggingObserver() {
+ ~LoggingObserver() override {
if (net_log())
net_log()->RemoveThreadSafeObserver(this);
}
- virtual void OnAddEntry(const NetLog::Entry& entry) override {
+ void OnAddEntry(const NetLog::Entry& entry) override {
base::Value* value = entry.ToValue();
base::DictionaryValue* dict = NULL;
ASSERT_TRUE(value->GetAsDictionary(&dict));
@@ -138,7 +136,7 @@ class NetLogTestThread : public base::SimpleThread {
net_log_ = net_log;
}
- virtual void Run() override {
+ void Run() override {
start_event_->Wait();
RunTestThread();
}
@@ -162,10 +160,10 @@ class NetLogTestThread : public base::SimpleThread {
class AddEventsTestThread : public NetLogTestThread {
public:
AddEventsTestThread() {}
- virtual ~AddEventsTestThread() {}
+ ~AddEventsTestThread() override {}
private:
- virtual void RunTestThread() override {
+ void RunTestThread() override {
for (int i = 0; i < kEvents; ++i)
AddEvent(net_log_);
}
@@ -178,12 +176,10 @@ class AddRemoveObserverTestThread : public NetLogTestThread {
public:
AddRemoveObserverTestThread() {}
- virtual ~AddRemoveObserverTestThread() {
- EXPECT_TRUE(!observer_.net_log());
- }
+ ~AddRemoveObserverTestThread() override { EXPECT_TRUE(!observer_.net_log()); }
private:
- virtual void RunTestThread() override {
+ void RunTestThread() override {
for (int i = 0; i < kEvents; ++i) {
ASSERT_FALSE(observer_.net_log());
« no previous file with comments | « net/base/net_log_logger.h ('k') | net/base/net_util_icu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698