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

Unified Diff: base/directory_watcher.h

Issue 92151: Add support for almost-recursive watches in Linux DirectoryWatcher... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 7 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/directory_watcher.h
===================================================================
--- base/directory_watcher.h (revision 15554)
+++ base/directory_watcher.h (working copy)
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/ref_counted.h"
+#include "testing/gtest/include/gtest/gtest_prod.h"
class FilePath;
@@ -19,6 +20,7 @@
public:
class Delegate {
public:
+ virtual ~Delegate() {}
virtual void OnDirectoryChanged(const FilePath& path) = 0;
};
@@ -44,12 +46,24 @@
virtual ~PlatformDelegate() {}
virtual bool Watch(const FilePath& path, Delegate* delegate,
bool recursive) = 0;
+
+ // This operation will block until all required OS native watches are
+ // set up.
+ virtual void EnsureSetupFinished() {}
};
private:
+ FRIEND_TEST(DirectoryWatcherTest, RecursiveWatchDeletedSubdirectory);
+ FRIEND_TEST(DirectoryWatcherTest, SubDirRecursive);
+
+ void EnsureSetupFinished() {
+ impl_->EnsureSetupFinished();
+ }
+
scoped_refptr<PlatformDelegate> impl_;
DISALLOW_COPY_AND_ASSIGN(DirectoryWatcher);
};
#endif // BASE_DIRECTORY_WATCHER_H_
+
« no previous file with comments | « AUTHORS ('k') | base/directory_watcher_inotify.cc » ('j') | base/directory_watcher_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698