Chromium Code Reviews| 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..bfb603abb696cf7beef3221688816752bb042d90 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, |
|
Mattias Nissler (ping if slow)
2012/11/22 08:51:34
nit: no need to break the line.
kmadhusu
2012/12/03 20:11:36
Done.
|
| + Delegate* delegate) { |
| DCHECK(path.IsAbsolute()); |
| - return impl_->Watch(path, delegate); |
| + return impl_->Watch(path, false, delegate); |
| } |
| FilePathWatcher::PlatformDelegate::PlatformDelegate(): cancelled_(false) { |
| @@ -62,8 +63,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 |