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

Unified Diff: chrome/browser/file_watcher.h

Issue 2868114: Rework FileWatcher to avoid race condition upon deletion. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Add missing return... Created 10 years, 4 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 | chrome/browser/file_watcher_inotify.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/file_watcher.h
diff --git a/chrome/browser/file_watcher.h b/chrome/browser/file_watcher.h
index f24be2e8ac3b153be6adc41ab7685fed897d2d74..2d4417bcc00c839c93f28ef1fbdd9cc14ae5d454 100644
--- a/chrome/browser/file_watcher.h
+++ b/chrome/browser/file_watcher.h
@@ -25,7 +25,10 @@ class FilePath;
// 2s of the file having changed.
class FileWatcher {
public:
- class Delegate {
+ // Declares the callback client code implements to receive notifications. Note
+ // that implementations of this interface should not keep a reference to the
+ // corresponding FileWatcher object to prevent a reference cycle.
+ class Delegate : public base::RefCountedThreadSafe<Delegate> {
public:
virtual ~Delegate() {}
virtual void OnFileChanged(const FilePath& path) = 0;
« no previous file with comments | « no previous file | chrome/browser/file_watcher_inotify.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698