From 825003f15cf15eb6c516dadba39ca45bc90024a0 Mon Sep 17 00:00:00 2001 From: "phajdan.jr@chromium.org" Date: Thu, 14 May 2009 17:49:23 +0000 Subject: 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 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 --- base/directory_watcher_win.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'base/directory_watcher_win.cc') diff --git a/base/directory_watcher_win.cc b/base/directory_watcher_win.cc index e75fe57..b6eb9ab 100644 --- a/base/directory_watcher_win.cc +++ b/base/directory_watcher_win.cc @@ -18,7 +18,7 @@ class DirectoryWatcherImpl : public DirectoryWatcher::PlatformDelegate, virtual ~DirectoryWatcherImpl(); virtual bool Watch(const FilePath& path, DirectoryWatcher::Delegate* delegate, - bool recursive); + MessageLoop* backend_loop, bool recursive); // Callback from MessageLoopForIO. virtual void OnObjectSignaled(HANDLE object); @@ -44,7 +44,8 @@ DirectoryWatcherImpl::~DirectoryWatcherImpl() { } bool DirectoryWatcherImpl::Watch(const FilePath& path, - DirectoryWatcher::Delegate* delegate, bool recursive) { + DirectoryWatcher::Delegate* delegate, + MessageLoop* backend_loop, bool recursive) { DCHECK(path_.value().empty()); // Can only watch one path. handle_ = FindFirstChangeNotification( -- cgit v1.1