OLD | NEW |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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 NET_QUIC_QUARTC_QUARTC_TASKRUNNER_INTERFACE_H_ | 5 #ifndef NET_QUIC_QUARTC_QUARTC_TASK_RUNNER_INTERFACE_H_ |
6 #define NET_QUIC_QUARTC_QUARTC_TASKRUNNER_INTERFACE_H_ | 6 #define NET_QUIC_QUARTC_QUARTC_TASK_RUNNER_INTERFACE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 namespace net { | 12 namespace net { |
13 | 13 |
14 // Used by platform specific QuicAlarms. For example, WebRTC will use it to set | 14 // Used by platform specific QuicAlarms. For example, WebRTC will use it to set |
15 // and cancel an alarm. When setting an alarm, the task runner will schedule a | 15 // and cancel an alarm. When setting an alarm, the task runner will schedule a |
16 // task on rtc::Thread. When canceling an alarm, the canceler for that task will | 16 // task on rtc::Thread. When canceling an alarm, the canceler for that task will |
(...skipping 24 matching lines...) Expand all Loading... |
41 }; | 41 }; |
42 | 42 |
43 // Schedules a task, which will be run after the given delay. A ScheduledTask | 43 // Schedules a task, which will be run after the given delay. A ScheduledTask |
44 // may be used to cancel the task. | 44 // may be used to cancel the task. |
45 virtual std::unique_ptr<ScheduledTask> Schedule(Task* task, | 45 virtual std::unique_ptr<ScheduledTask> Schedule(Task* task, |
46 uint64_t delay_ms) = 0; | 46 uint64_t delay_ms) = 0; |
47 }; | 47 }; |
48 | 48 |
49 } // namespace net | 49 } // namespace net |
50 | 50 |
51 #endif // NET_QUIC_QUARTC_QUARTC_TASKRUNNER_INTERFACE_H_ | 51 #endif // NET_QUIC_QUARTC_QUARTC_TASK_RUNNER_INTERFACE_H_ |
OLD | NEW |