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

Unified Diff: base/files/file_path_watcher_kqueue.cc

Issue 11415066: FilePathWatcher::Watch() - Listen for sub directory changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comments Created 8 years 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_kqueue.cc
diff --git a/base/files/file_path_watcher_kqueue.cc b/base/files/file_path_watcher_kqueue.cc
index 6221a62f379e2385dadabca22de0893451c92068..aebe15aa2d60803bb5406c0df85922af606daf2d 100644
--- a/base/files/file_path_watcher_kqueue.cc
+++ b/base/files/file_path_watcher_kqueue.cc
@@ -12,6 +12,7 @@
#include "base/bind.h"
#include "base/file_util.h"
+#include "base/logging.h"
#include "base/message_loop.h"
#include "base/message_loop_proxy.h"
#include "base/stringprintf.h"
@@ -64,6 +65,7 @@ class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate,
// FilePathWatcher::PlatformDelegate overrides.
virtual bool Watch(const FilePath& path,
+ bool recursive,
FilePathWatcher::Delegate* delegate) OVERRIDE;
virtual void Cancel() OVERRIDE;
@@ -428,12 +430,19 @@ void FilePathWatcherImpl::WillDestroyCurrentMessageLoop() {
}
bool FilePathWatcherImpl::Watch(const FilePath& path,
+ bool recursive,
FilePathWatcher::Delegate* delegate) {
DCHECK(MessageLoopForIO::current());
DCHECK(target_.value().empty()); // Can only watch one path.
DCHECK(delegate);
DCHECK_EQ(kqueue_, -1);
+ if (recursive) {
+ // Recursive watch is not supported on this platform.
+ NOTIMPLEMENTED();
+ return false;
+ }
+
delegate_ = delegate;
target_ = path;

Powered by Google App Engine
This is Rietveld 408576698