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

Unified Diff: base/synchronization/waitable_event_watcher_posix.cc

Issue 10004001: Add virtual and OVERRIDE to base/ implementation files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedback from chromium-dev Created 8 years, 8 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/synchronization/waitable_event_watcher_posix.cc
diff --git a/base/synchronization/waitable_event_watcher_posix.cc b/base/synchronization/waitable_event_watcher_posix.cc
index 3b0ba70c22b481891d49dea8b3f9437b0ae17084..c45792d240347be010d6a548298df013e3dbef38 100644
--- a/base/synchronization/waitable_event_watcher_posix.cc
+++ b/base/synchronization/waitable_event_watcher_posix.cc
@@ -43,6 +43,9 @@ class Flag : public RefCountedThreadSafe<Flag> {
}
private:
+ friend class RefCountedThreadSafe<Flag>;
Nico 2012/04/05 19:16:02 likely unnecessary?
+ ~Flag() {}
Nico 2012/04/05 19:16:02 unnecessary, or at least unrelated?
Ryan Sleevi 2012/04/05 19:22:38 Unnecessary no, unrelated yes. This bled in from
+
mutable Lock lock_;
bool flag_;
};
@@ -60,7 +63,7 @@ class AsyncWaiter : public WaitableEvent::Waiter {
callback_(callback),
flag_(flag) { }
- bool Fire(WaitableEvent* event) {
+ virtual bool Fire(WaitableEvent* event) OVERRIDE {
// Post the callback if we haven't been cancelled.
if (!flag_->value()) {
message_loop_->PostTask(FROM_HERE, callback_);
@@ -76,7 +79,7 @@ class AsyncWaiter : public WaitableEvent::Waiter {
}
// See StopWatching for discussion
- bool Compare(void* tag) {
+ virtual bool Compare(void* tag) OVERRIDE {
return tag == flag_.get();
}

Powered by Google App Engine
This is Rietveld 408576698