| Index: base/directory_watcher.h
|
| ===================================================================
|
| --- base/directory_watcher.h (revision 15554)
|
| +++ base/directory_watcher.h (working copy)
|
| @@ -9,6 +9,7 @@
|
|
|
| #include "base/basictypes.h"
|
| #include "base/ref_counted.h"
|
| +#include "testing/gtest/include/gtest/gtest_prod.h"
|
|
|
| class FilePath;
|
|
|
| @@ -19,6 +20,7 @@
|
| public:
|
| class Delegate {
|
| public:
|
| + virtual ~Delegate() {}
|
| virtual void OnDirectoryChanged(const FilePath& path) = 0;
|
| };
|
|
|
| @@ -44,12 +46,24 @@
|
| virtual ~PlatformDelegate() {}
|
| virtual bool Watch(const FilePath& path, Delegate* delegate,
|
| bool recursive) = 0;
|
| +
|
| + // This operation will block until all required OS native watches are
|
| + // set up.
|
| + virtual void EnsureSetupFinished() {}
|
| };
|
|
|
| private:
|
| + FRIEND_TEST(DirectoryWatcherTest, RecursiveWatchDeletedSubdirectory);
|
| + FRIEND_TEST(DirectoryWatcherTest, SubDirRecursive);
|
| +
|
| + void EnsureSetupFinished() {
|
| + impl_->EnsureSetupFinished();
|
| + }
|
| +
|
| scoped_refptr<PlatformDelegate> impl_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DirectoryWatcher);
|
| };
|
|
|
| #endif // BASE_DIRECTORY_WATCHER_H_
|
| +
|
|
|