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

Unified Diff: base/files/file_path_watcher.h

Issue 11415066: FilePathWatcher::Watch() - Listen for sub directory changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac compile error. Created 8 years, 1 month 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
« no previous file with comments | « no previous file | base/files/file_path_watcher.cc » ('j') | base/files/file_path_watcher_browsertest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_path_watcher.h
diff --git a/base/files/file_path_watcher.h b/base/files/file_path_watcher.h
index 367be9435e9c952b7865b8f0aab3f479eeb6963e..f01f38137880d9a27fc6ccfe1a207001a62a42fd 100644
--- a/base/files/file_path_watcher.h
+++ b/base/files/file_path_watcher.h
@@ -59,6 +59,7 @@ class BASE_EXPORT FilePathWatcher {
// Start watching for the given |path| and notify |delegate| about changes.
virtual bool Watch(const FilePath& path,
+ bool recursive,
Delegate* delegate) WARN_UNUSED_RESULT = 0;
// Stop watching. This is called from FilePathWatcher's dtor in order to
@@ -115,13 +116,14 @@ class BASE_EXPORT FilePathWatcher {
// Deprecated: new code should use the callback interface, declared below.
// The FilePathWatcher::Delegate interface will be removed once all client
// code has been updated. http://crbug.com/130980
- virtual bool Watch(const FilePath& path, Delegate* delegate)
+ virtual bool Watch(const FilePath& path, bool recursive, Delegate* delegate)
Lei Zhang 2012/11/21 03:36:49 Do we need this? I don't think anyone will write n
kmadhusu 2012/11/21 04:13:26 bool Watch(const FilePath& path, bool recursive, c
Lei Zhang 2012/11/21 04:21:02 Maybe it's time to make the new Watch() method cal
kmadhusu 2012/11/22 01:39:41 Done.
WARN_UNUSED_RESULT;
// Invokes |callback| whenever updates to |path| are detected. This should be
- // called at most once, and from a MessageLoop of TYPE_IO. The callback will
+ // called at most once, and from a MessageLoop of TYPE_IO. Set |recursive| to
Lei Zhang 2012/11/21 03:36:49 "Set |recursive| to true to watch the |path| and i
kmadhusu 2012/11/21 04:13:26 Done.
+ // true, to watch the sub trees of the specified |path|. The callback will
// be invoked on the same loop. Returns true on success.
- bool Watch(const FilePath& path, const Callback& callback);
+ bool Watch(const FilePath& path, bool recursive, const Callback& callback);
private:
scoped_refptr<PlatformDelegate> impl_;
« no previous file with comments | « no previous file | base/files/file_path_watcher.cc » ('j') | base/files/file_path_watcher_browsertest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698