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

Unified Diff: base/files/file_path_watcher_browsertest.cc

Issue 10065037: RefCounted types should not have public destructors, base/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/files/file_path_watcher_browsertest.cc
diff --git a/base/files/file_path_watcher_browsertest.cc b/base/files/file_path_watcher_browsertest.cc
index 5d466db39ce9fc6e4f89fc0a7065a09bc2c839a3..3d2fccff2218caa13f8b7b2797b18d25388bb848 100644
--- a/base/files/file_path_watcher_browsertest.cc
+++ b/base/files/file_path_watcher_browsertest.cc
@@ -65,6 +65,9 @@ class NotificationCollector
}
private:
+ friend class base::RefCountedThreadSafe<NotificationCollector>;
+ ~NotificationCollector() {}
+
void RecordChange(TestDelegate* delegate) {
ASSERT_TRUE(loop_->BelongsToCurrentThread());
ASSERT_TRUE(delegates_.count(delegate));
@@ -108,6 +111,8 @@ class TestDelegate : public FilePathWatcher::Delegate {
}
private:
+ virtual ~TestDelegate() {}
+
scoped_refptr<NotificationCollector> collector_;
DISALLOW_COPY_AND_ASSIGN(TestDelegate);
@@ -249,6 +254,9 @@ class Deleter : public FilePathWatcher::Delegate {
scoped_ptr<FilePathWatcher> watcher_;
MessageLoop* loop_;
+
+ private:
+ virtual ~Deleter() {}
};
// Verify that deleting a watcher during the callback doesn't crash.

Powered by Google App Engine
This is Rietveld 408576698