OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_ | 5 #ifndef BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_ |
6 #define BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_ | 6 #define BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_ |
7 | 7 |
8 #include <sys/event.h> | 8 #include <sys/event.h> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/files/file_path_watcher.h" | 12 #include "base/files/file_path_watcher.h" |
| 13 #include "base/macros.h" |
13 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
14 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
15 | 16 |
16 namespace base { | 17 namespace base { |
17 | 18 |
18 // Mac-specific file watcher implementation based on kqueue. | 19 // Mac-specific file watcher implementation based on kqueue. |
19 // The Linux and Windows versions are able to detect: | 20 // The Linux and Windows versions are able to detect: |
20 // - file creation/deletion/modification in a watched directory | 21 // - file creation/deletion/modification in a watched directory |
21 // - file creation/deletion/modification for a watched file | 22 // - file creation/deletion/modification for a watched file |
22 // - modifications to the paths to a watched object that would affect the | 23 // - modifications to the paths to a watched object that would affect the |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 FilePathWatcher::Callback callback_; | 124 FilePathWatcher::Callback callback_; |
124 FilePath target_; | 125 FilePath target_; |
125 int kqueue_; | 126 int kqueue_; |
126 | 127 |
127 DISALLOW_COPY_AND_ASSIGN(FilePathWatcherKQueue); | 128 DISALLOW_COPY_AND_ASSIGN(FilePathWatcherKQueue); |
128 }; | 129 }; |
129 | 130 |
130 } // namespace base | 131 } // namespace base |
131 | 132 |
132 #endif // BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_ | 133 #endif // BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_ |
OLD | NEW |