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_ALARM_FACTORY_H_ | 5 #ifndef NET_QUIC_QUARTC_QUARTC_ALARM_FACTORY_H_ |
6 #define NET_QUIC_QUARTC_QUARTC_ALARM_FACTORY_H_ | 6 #define NET_QUIC_QUARTC_QUARTC_ALARM_FACTORY_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "net/base/net_export.h" | |
11 #include "net/quic/core/quic_alarm_factory.h" | 10 #include "net/quic/core/quic_alarm_factory.h" |
12 #include "net/quic/platform/api/quic_clock.h" | 11 #include "net/quic/platform/api/quic_clock.h" |
| 12 #include "net/quic/platform/api/quic_export.h" |
13 | 13 |
14 namespace base { | 14 namespace base { |
15 class TaskRunner; | 15 class TaskRunner; |
16 } // namespace base | 16 } // namespace base |
17 | 17 |
18 namespace net { | 18 namespace net { |
19 | 19 |
20 // Creates Chromium-based QuartcAlarms used throughout QUIC. The alarm posts | 20 // Creates Chromium-based QuartcAlarms used throughout QUIC. The alarm posts |
21 // messages to the Chromium message queue for tasks such as retransmission. | 21 // messages to the Chromium message queue for tasks such as retransmission. |
22 // Used for the tests inside Chromium. | 22 // Used for the tests inside Chromium. |
23 class NET_EXPORT_PRIVATE QuartcAlarmFactory : public QuicAlarmFactory { | 23 class QUIC_EXPORT_PRIVATE QuartcAlarmFactory : public QuicAlarmFactory { |
24 public: | 24 public: |
25 QuartcAlarmFactory(base::TaskRunner* task_runner, const QuicClock* clock); | 25 QuartcAlarmFactory(base::TaskRunner* task_runner, const QuicClock* clock); |
26 ~QuartcAlarmFactory() override; | 26 ~QuartcAlarmFactory() override; |
27 | 27 |
28 QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override; | 28 QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override; |
29 | 29 |
30 QuicArenaScopedPtr<QuicAlarm> CreateAlarm( | 30 QuicArenaScopedPtr<QuicAlarm> CreateAlarm( |
31 QuicArenaScopedPtr<QuicAlarm::Delegate> delegate, | 31 QuicArenaScopedPtr<QuicAlarm::Delegate> delegate, |
32 QuicConnectionArena* arena) override; | 32 QuicConnectionArena* arena) override; |
33 | 33 |
34 private: | 34 private: |
35 base::TaskRunner* task_runner_; | 35 base::TaskRunner* task_runner_; |
36 // Not owned by QuartcAlarmFactory. The implementation of | 36 // Not owned by QuartcAlarmFactory. The implementation of |
37 // QuicConnectionHelperInterface owns it. | 37 // QuicConnectionHelperInterface owns it. |
38 const QuicClock* clock_; | 38 const QuicClock* clock_; |
39 | 39 |
40 DISALLOW_COPY_AND_ASSIGN(QuartcAlarmFactory); | 40 DISALLOW_COPY_AND_ASSIGN(QuartcAlarmFactory); |
41 }; | 41 }; |
42 | 42 |
43 } // namespace net | 43 } // namespace net |
44 | 44 |
45 #endif // NET_QUIC_QUARTC_QUARTC_ALARM_FACTORY_H_ | 45 #endif // NET_QUIC_QUARTC_QUARTC_ALARM_FACTORY_H_ |
OLD | NEW |