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

Unified Diff: base/files/file_path_watcher.cc

Issue 11415066: FilePathWatcher::Watch() - Listen for sub directory changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac compile error. 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.cc
diff --git a/base/files/file_path_watcher.cc b/base/files/file_path_watcher.cc
index dd2b37fc78d80a937c00afcb803cfc784970047b..98da0eb6ea0ba249f49c025e16ebf6b1e8a0e29b 100644
--- a/base/files/file_path_watcher.cc
+++ b/base/files/file_path_watcher.cc
@@ -50,9 +50,10 @@ void FilePathWatcher::CancelWatch(
delegate->CancelOnMessageLoopThread();
}
-bool FilePathWatcher::Watch(const FilePath& path, Delegate* delegate) {
+bool FilePathWatcher::Watch(const FilePath& path, bool recursive,
+ Delegate* delegate) {
DCHECK(path.IsAbsolute());
- return impl_->Watch(path, delegate);
+ return impl_->Watch(path, recursive, delegate);
}
FilePathWatcher::PlatformDelegate::PlatformDelegate(): cancelled_(false) {
@@ -62,8 +63,9 @@ FilePathWatcher::PlatformDelegate::~PlatformDelegate() {
DCHECK(is_cancelled());
}
-bool FilePathWatcher::Watch(const FilePath& path, const Callback& callback) {
- return Watch(path, new FilePathWatcherDelegate(callback));
+bool FilePathWatcher::Watch(const FilePath& path, bool recursive,
+ const Callback& callback) {
+ return Watch(path, recursive, new FilePathWatcherDelegate(callback));
}
} // namespace files

Powered by Google App Engine
This is Rietveld 408576698