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

Side by Side Diff: base/task_scheduler/task_tracker_posix.h

Issue 2427963002: Support FileDescriptorWatcher in TaskScheduler. (Closed)
Patch Set: fix build error Created 4 years, 2 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BASE_TASK_SCHEDULER_TASK_TRACKER_POSIX_H_
6 #define BASE_TASK_SCHEDULER_TASK_TRACKER_POSIX_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "base/task_scheduler/task_tracker.h"
12
13 namespace base {
14
15 class MessageLoopForIO;
16
17 namespace internal {
18
19 struct Task;
20
21 // A TaskTracker that performs POSIX-specific work before running a task.
22 class BASE_EXPORT TaskTrackerPosix : public TaskTracker {
robliao 2016/10/20 00:59:40 Is a BASE_EXPORT currently required for TaskTracke
fdoray 2016/10/21 12:29:43 Done.
23 public:
24 // |watch_file_descriptor_message_loop| is used to setup FileDescriptorWatcher
25 // in the scope in which a Task runs.
26 TaskTrackerPosix(MessageLoopForIO* watch_file_descriptor_message_loop);
27
robliao 2016/10/20 00:59:40 Nit: No line break needed here.
fdoray 2016/10/21 12:29:43 Done.
28 ~TaskTrackerPosix();
29
30 private:
31 // TaskTracker:
32 void PerformRunTask(std::unique_ptr<Task> task) override;
33
34 MessageLoopForIO* const watch_file_descriptor_message_loop_;
35
36 DISALLOW_COPY_AND_ASSIGN(TaskTrackerPosix);
37 };
38
39 } // namespace internal
40 } // namespace base
41
42 #endif // BASE_TASK_SCHEDULER_TASK_TRACKER_POSIX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698