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

Unified Diff: base/files/file_path_watcher_linux.cc

Issue 11415066: FilePathWatcher::Watch() - Listen for sub directory changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments Created 8 years, 1 month 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_linux.cc
diff --git a/base/files/file_path_watcher_linux.cc b/base/files/file_path_watcher_linux.cc
index b4a71360e75c807e43163557968269e769122b65..9e550227dfc9b82ac08ac7cc852254c7d4bf3ac2 100644
--- a/base/files/file_path_watcher_linux.cc
+++ b/base/files/file_path_watcher_linux.cc
@@ -100,6 +100,7 @@ class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate,
// Start watching |path| for changes and notify |delegate| on each change.
// Returns true if watch for |path| has been added successfully.
virtual bool Watch(const FilePath& path,
+ bool recursive,
FilePathWatcher::Delegate* delegate) OVERRIDE;
// Cancel the watch. This unregisters the instance with InotifyReader.
@@ -361,9 +362,15 @@ void FilePathWatcherImpl::OnFilePathChanged(InotifyReader::Watch fired_watch,
}
bool FilePathWatcherImpl::Watch(const FilePath& path,
+ bool recursive,
FilePathWatcher::Delegate* delegate) {
DCHECK(target_.empty());
DCHECK(MessageLoopForIO::current());
+ if (recursive) {
+ // Recursive watch is not supported on this platform.
+ NOTIMPLEMENTED();
+ return false;
+ }
set_message_loop(base::MessageLoopProxy::current());
delegate_ = delegate;

Powered by Google App Engine
This is Rietveld 408576698