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

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: '' 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.cc
diff --git a/base/files/file_path_watcher.cc b/base/files/file_path_watcher.cc
index dd2b37fc78d80a937c00afcb803cfc784970047b..bc8db37f1b636881348be5a46a830ec314d7d833 100644
--- a/base/files/file_path_watcher.cc
+++ b/base/files/file_path_watcher.cc
@@ -52,7 +52,7 @@ void FilePathWatcher::CancelWatch(
bool FilePathWatcher::Watch(const FilePath& path, Delegate* delegate) {
DCHECK(path.IsAbsolute());
- return impl_->Watch(path, delegate);
+ return impl_->Watch(path, false, delegate);
}
FilePathWatcher::PlatformDelegate::PlatformDelegate(): cancelled_(false) {
@@ -62,8 +62,11 @@ 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) {
+ DCHECK(path.IsAbsolute());
+ return impl_->Watch(path, recursive, new FilePathWatcherDelegate(callback));
}
} // namespace files

Powered by Google App Engine
This is Rietveld 408576698