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

Unified Diff: base/files/file_path_watcher.h

Issue 10065037: RefCounted types should not have public destructors, base/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Typo fix 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
« no previous file with comments | « no previous file | base/files/file_path_watcher_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_path_watcher.h
diff --git a/base/files/file_path_watcher.h b/base/files/file_path_watcher.h
index 3174a9e0ac9069037151b616839aa789cd1ab5e1..31406289fe376d2e4ae9a87dfa2ff20247c02f5d 100644
--- a/base/files/file_path_watcher.h
+++ b/base/files/file_path_watcher.h
@@ -33,11 +33,14 @@ class BASE_EXPORT FilePathWatcher {
// corresponding FileWatcher object to prevent a reference cycle.
class Delegate : public base::RefCountedThreadSafe<Delegate> {
public:
- virtual ~Delegate() {}
virtual void OnFilePathChanged(const FilePath& path) = 0;
// Called when platform specific code detected an error. The watcher will
// not call OnFilePathChanged for future changes.
virtual void OnFilePathError(const FilePath& path) {}
+
+ protected:
+ friend class base::RefCountedThreadSafe<Delegate>;
+ virtual ~Delegate() {}
};
// Used internally to encapsulate different members on different platforms.
@@ -57,6 +60,7 @@ class BASE_EXPORT FilePathWatcher {
virtual void Cancel() = 0;
protected:
+ friend class base::RefCountedThreadSafe<PlatformDelegate>;
friend class FilePathWatcher;
virtual ~PlatformDelegate();
@@ -84,8 +88,6 @@ class BASE_EXPORT FilePathWatcher {
}
private:
- friend class base::RefCountedThreadSafe<PlatformDelegate>;
-
scoped_refptr<base::MessageLoopProxy> message_loop_;
bool cancelled_;
};
« no previous file with comments | « no previous file | base/files/file_path_watcher_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698