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

Unified Diff: base/observer_list_unittest.cc

Issue 614103004: replace 'virtual ... OVERRIDE' with '... override' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: process base/ Created 6 years, 3 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
Index: base/observer_list_unittest.cc
diff --git a/base/observer_list_unittest.cc b/base/observer_list_unittest.cc
index 1bda3dcadae1a8d6193e0458ee7ac5f43bed380a..55425e33037f7e05f6caf57767b1f1f56bff9600 100644
--- a/base/observer_list_unittest.cc
+++ b/base/observer_list_unittest.cc
@@ -26,9 +26,7 @@ class Foo {
class Adder : public Foo {
public:
explicit Adder(int scaler) : total(0), scaler_(scaler) {}
- virtual void Observe(int x) OVERRIDE {
- total += x * scaler_;
- }
+ void Observe(int x) override { total += x * scaler_; }
virtual ~Adder() {}
int total;
@@ -43,9 +41,7 @@ class Disrupter : public Foo {
doomed_(doomed) {
}
virtual ~Disrupter() {}
- virtual void Observe(int x) OVERRIDE {
- list_->RemoveObserver(doomed_);
- }
+ void Observe(int x) override { list_->RemoveObserver(doomed_); }
private:
ObserverList<Foo>* list_;
@@ -59,9 +55,7 @@ class ThreadSafeDisrupter : public Foo {
doomed_(doomed) {
}
virtual ~ThreadSafeDisrupter() {}
- virtual void Observe(int x) OVERRIDE {
- list_->RemoveObserver(doomed_);
- }
+ void Observe(int x) override { list_->RemoveObserver(doomed_); }
private:
ObserverListThreadSafe<Foo>* list_;
@@ -77,7 +71,7 @@ class AddInObserve : public Foo {
adder(1) {
}
- virtual void Observe(int x) OVERRIDE {
+ void Observe(int x) override {
if (!added) {
added = true;
observer_list->AddObserver(&adder);
@@ -112,7 +106,7 @@ class AddRemoveThread : public PlatformThread::Delegate,
virtual ~AddRemoveThread() {
}
- virtual void ThreadMain() OVERRIDE {
+ void ThreadMain() override {
loop_ = new MessageLoop(); // Fire up a message loop.
loop_->PostTask(
FROM_HERE,
@@ -153,7 +147,7 @@ class AddRemoveThread : public PlatformThread::Delegate,
loop_->PostTask(FROM_HERE, MessageLoop::QuitWhenIdleClosure());
}
- virtual void Observe(int x) OVERRIDE {
+ void Observe(int x) override {
count_observes_++;
// If we're getting called after we removed ourselves from
@@ -329,7 +323,7 @@ class FooRemover : public Foo {
foos_.push_back(foo);
}
- virtual void Observe(int x) OVERRIDE {
+ void Observe(int x) override {
std::vector<Foo*> tmp;
tmp.swap(foos_);
for (std::vector<Foo*>::iterator it = tmp.begin();
@@ -481,7 +475,7 @@ class AddInClearObserve : public Foo {
explicit AddInClearObserve(ObserverList<Foo>* list)
: list_(list), added_(false), adder_(1) {}
- virtual void Observe(int /* x */) OVERRIDE {
+ void Observe(int /* x */) override {
list_->Clear();
list_->AddObserver(&adder_);
added_ = true;
@@ -526,9 +520,7 @@ class ListDestructor : public Foo {
explicit ListDestructor(ObserverList<Foo>* list) : list_(list) {}
virtual ~ListDestructor() {}
- virtual void Observe(int x) OVERRIDE {
- delete list_;
- }
+ void Observe(int x) override { delete list_; }
private:
ObserverList<Foo>* list_;

Powered by Google App Engine
This is Rietveld 408576698