OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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 // The Chrome-specific AlarmFactory for QuicConnection which uses |
| 6 // a TaskRunner for alarms. |
| 7 |
| 8 #ifndef NET_QUIC_QUIC_CHROMIUM_ALARM_FACTORY_H_ |
| 9 #define NET_QUIC_QUIC_CHROMIUM_ALARM_FACTORY_H_ |
| 10 |
| 11 #include <set> |
| 12 |
| 13 #include "base/macros.h" |
| 14 #include "net/quic/quic_alarm_factory.h" |
| 15 #include "net/quic/quic_connection.h" |
| 16 #include "net/quic/quic_protocol.h" |
| 17 #include "net/quic/quic_simple_buffer_allocator.h" |
| 18 #include "net/quic/quic_time.h" |
| 19 #include "net/udp/datagram_client_socket.h" |
| 20 |
| 21 namespace base { |
| 22 class TaskRunner; |
| 23 } // namespace base |
| 24 |
| 25 namespace net { |
| 26 |
| 27 class QuicClock; |
| 28 class QuicRandom; |
| 29 |
| 30 class NET_EXPORT_PRIVATE QuicChromiumAlarmFactory : public QuicAlarmFactory { |
| 31 public: |
| 32 QuicChromiumAlarmFactory(base::TaskRunner* task_runner, |
| 33 const QuicClock* clock); |
| 34 QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override; |
| 35 QuicArenaScopedPtr<QuicAlarm> CreateAlarm( |
| 36 QuicArenaScopedPtr<QuicAlarm::Delegate> delegate, |
| 37 QuicConnectionArena* arena) override; |
| 38 |
| 39 private: |
| 40 base::TaskRunner* task_runner_; |
| 41 const QuicClock* clock_; |
| 42 }; |
| 43 |
| 44 } // namespace net |
| 45 |
| 46 #endif // NET_QUIC_QUIC_CHROMIUM_ALARM_FACTORY_H_ |
OLD | NEW |