diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-14 17:49:23 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-14 17:49:23 +0000 |
commit | 825003f15cf15eb6c516dadba39ca45bc90024a0 (patch) | |
tree | a25370356ef39c2567bf8c30cd58cb9b80e20932 /base/directory_watcher_mac.cc | |
parent | e55d77c4230d7a2ddbf8bcd8e2d7f5def54c44d3 (diff) | |
download | chromium_src-825003f15cf15eb6c516dadba39ca45bc90024a0.zip chromium_src-825003f15cf15eb6c516dadba39ca45bc90024a0.tar.gz chromium_src-825003f15cf15eb6c516dadba39ca45bc90024a0.tar.bz2 |
Add support for almost-recursive watches in Linux DirectoryWatcher
After this patch DirectoryWatcher when asked for recursive watch will scan the
subtree and add inotify watches for each subfolder, but further changes to the
tree structure won't trigger adding/removing watches.
Support for really recursive watches is planned. This is just to divide the
work, because the task is not easy.
Based on patch by Janwar Dinata <j.dinata@gmail.com> reviewed at http://codereview.chromium.org/92151
http://crbug.com/8968
Review URL: http://codereview.chromium.org/115229
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16070 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/directory_watcher_mac.cc')
-rw-r--r-- | base/directory_watcher_mac.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/base/directory_watcher_mac.cc b/base/directory_watcher_mac.cc index d4b3082..dc3eba6 100644 --- a/base/directory_watcher_mac.cc +++ b/base/directory_watcher_mac.cc @@ -28,7 +28,7 @@ class DirectoryWatcherImpl : public DirectoryWatcher::PlatformDelegate { } virtual bool Watch(const FilePath& path, DirectoryWatcher::Delegate* delegate, - bool recursive); + MessageLoop* backend_loop, bool recursive); void OnFSEventsCallback(const FilePath& event_path) { DCHECK(!path_.value().empty()); @@ -72,6 +72,7 @@ void FSEventsCallback(ConstFSEventStreamRef stream, bool DirectoryWatcherImpl::Watch(const FilePath& path, DirectoryWatcher::Delegate* delegate, + MessageLoop* backend_loop, bool recursive) { DCHECK(path_.value().empty()); // Can only watch one path. |