Use FSEvents for recursive file watch on Mac
Brings back the old FSEvents code, changing it to support recursive watches only, and use dispatch queues instead of using the CFRunLoop from the UI thread.
BUG=144491
Review URL: https://codereview.chromium.org/313083007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276289 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: 6d2d92a83fbc0a79d3172a692142677f9fd44206
diff --git a/base/files/file_path_watcher.h b/base/files/file_path_watcher.h
index 3c1941f..b90efa1 100644
--- a/base/files/file_path_watcher.h
+++ b/base/files/file_path_watcher.h
@@ -88,12 +88,15 @@
// shutdown.
static void CancelWatch(const scoped_refptr<PlatformDelegate>& delegate);
+ // Returns true if the platform and OS version support recursive watches.
+ static bool RecursiveWatchAvailable();
+
// Invokes |callback| whenever updates to |path| are detected. This should be
// called at most once, and from a MessageLoop of TYPE_IO. Set |recursive| to
// true, to watch |path| and its children. The callback will be invoked on
// the same loop. Returns true on success.
//
- // NOTE: Recursive watch is not supported on all platforms and file systems.
+ // Recursive watch is not supported on all platforms and file systems.
// Watch() will return false in the case of failure.
bool Watch(const FilePath& path, bool recursive, const Callback& callback);