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

Side by Side Diff: base/files/file_path_watcher_kqueue.h

Issue 2598193002: Allow FilePathWatcher to be used from sequenced tasks. (Closed)
Patch Set: thread -> sequence in comment Created 3 years, 12 months 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 unified diff | Download patch
« no previous file with comments | « base/files/file_path_watcher_fsevents.cc ('k') | base/files/file_path_watcher_kqueue.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 9
10 #include <memory> 10 #include <memory>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/files/file_descriptor_watcher_posix.h" 13 #include "base/files/file_descriptor_watcher_posix.h"
14 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
15 #include "base/files/file_path_watcher.h" 15 #include "base/files/file_path_watcher.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/single_thread_task_runner.h"
18 17
19 namespace base { 18 namespace base {
20 19
21 // Mac-specific file watcher implementation based on kqueue. 20 // Mac-specific file watcher implementation based on kqueue.
22 // The Linux and Windows versions are able to detect: 21 // The Linux and Windows versions are able to detect:
23 // - file creation/deletion/modification in a watched directory 22 // - file creation/deletion/modification in a watched directory
24 // - file creation/deletion/modification for a watched file 23 // - file creation/deletion/modification for a watched file
25 // - modifications to the paths to a watched object that would affect the 24 // - modifications to the paths to a watched object that would affect the
26 // object such as renaming/attibute changes etc. 25 // object such as renaming/attibute changes etc.
27 // The kqueue implementation will handle all of the items in the list above 26 // The kqueue implementation will handle all of the items in the list above
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // Throughout the lifetime of this, OnKQueueReadable() will be called when 118 // Throughout the lifetime of this, OnKQueueReadable() will be called when
120 // data is available in |kqueue_|. 119 // data is available in |kqueue_|.
121 std::unique_ptr<FileDescriptorWatcher::Controller> kqueue_watch_controller_; 120 std::unique_ptr<FileDescriptorWatcher::Controller> kqueue_watch_controller_;
122 121
123 DISALLOW_COPY_AND_ASSIGN(FilePathWatcherKQueue); 122 DISALLOW_COPY_AND_ASSIGN(FilePathWatcherKQueue);
124 }; 123 };
125 124
126 } // namespace base 125 } // namespace base
127 126
128 #endif // BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_ 127 #endif // BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_
OLDNEW
« no previous file with comments | « base/files/file_path_watcher_fsevents.cc ('k') | base/files/file_path_watcher_kqueue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698