| Index: base/files/file_path_watcher_fsevents.h
|
| diff --git a/base/files/file_path_watcher_fsevents.h b/base/files/file_path_watcher_fsevents.h
|
| index fbcca1f81010a56a6adc1272fe38b7f30670066b..dcdf2fbf9d172d5869543c394ee760dc6e4bc47a 100644
|
| --- a/base/files/file_path_watcher_fsevents.h
|
| +++ b/base/files/file_path_watcher_fsevents.h
|
| @@ -14,6 +14,7 @@
|
| #include "base/files/file_path_watcher.h"
|
| #include "base/mac/scoped_dispatch_object.h"
|
| #include "base/macros.h"
|
| +#include "base/memory/weak_ptr.h"
|
|
|
| namespace base {
|
|
|
| @@ -26,6 +27,7 @@ namespace base {
|
| class FilePathWatcherFSEvents : public FilePathWatcher::PlatformDelegate {
|
| public:
|
| FilePathWatcherFSEvents();
|
| + ~FilePathWatcherFSEvents() override;
|
|
|
| // FilePathWatcher::PlatformDelegate overrides.
|
| bool Watch(const FilePath& path,
|
| @@ -41,8 +43,6 @@ class FilePathWatcherFSEvents : public FilePathWatcher::PlatformDelegate {
|
| const FSEventStreamEventFlags flags[],
|
| const FSEventStreamEventId event_ids[]);
|
|
|
| - ~FilePathWatcherFSEvents() override;
|
| -
|
| // Called from FSEventsCallback whenever there is a change to the paths.
|
| void OnFilePathsChanged(const std::vector<FilePath>& paths);
|
|
|
| @@ -53,9 +53,6 @@ class FilePathWatcherFSEvents : public FilePathWatcher::PlatformDelegate {
|
| const FilePath& target,
|
| const FilePath& resolved_target);
|
|
|
| - // Cleans up and stops the event stream.
|
| - void CancelOnMessageLoopThread();
|
| -
|
| // (Re-)Initialize the event stream to start reporting events from
|
| // |start_event|.
|
| void UpdateEventStream(FSEventStreamEventId start_event);
|
| @@ -92,6 +89,8 @@ class FilePathWatcherFSEvents : public FilePathWatcher::PlatformDelegate {
|
| // (Only accessed from the libdispatch queue.)
|
| FSEventStreamRef fsevent_stream_;
|
|
|
| + WeakPtrFactory<FilePathWatcherFSEvents> weak_factory_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(FilePathWatcherFSEvents);
|
| };
|
|
|
|
|