Index: net/tools/quic/quic_epoll_alarm_factory.h |
diff --git a/net/tools/quic/quic_epoll_alarm_factory.h b/net/tools/quic/quic_epoll_alarm_factory.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..154acc34c560a38b873d8050b7d8457dcce20904 |
--- /dev/null |
+++ b/net/tools/quic/quic_epoll_alarm_factory.h |
@@ -0,0 +1,36 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+// |
+// The Google-specific helper for QuicConnection which uses |
+// EpollAlarm for alarms, and used an int fd_ for writing data. |
+ |
+#ifndef NET_TOOLS_QUIC_QUIC_EPOLL_ALARM_FACTORY_H_ |
+#define NET_TOOLS_QUIC_QUIC_EPOLL_ALARM_FACTORY_H_ |
+ |
+#include "net/quic/quic_alarm_factory.h" |
+#include "net/tools/quic/quic_epoll_connection_helper.h" |
+ |
+namespace net { |
+ |
+// Creates alarms that use the supplied EpollServer for timing and firing. |
+class QuicEpollAlarmFactory : public QuicAlarmFactory { |
+ public: |
+ explicit QuicEpollAlarmFactory(EpollServer* eps); |
+ ~QuicEpollAlarmFactory() override; |
+ |
+ // QuicAlarmFactory interface. |
+ QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override; |
+ QuicArenaScopedPtr<QuicAlarm> CreateAlarm( |
+ QuicArenaScopedPtr<QuicAlarm::Delegate> delegate, |
+ QuicConnectionArena* arena) override; |
+ |
+ private: |
+ EpollServer* epoll_server_; // Not owned. |
+ |
+ DISALLOW_COPY_AND_ASSIGN(QuicEpollAlarmFactory); |
+}; |
+ |
+} // namespace net |
+ |
+#endif // NET_TOOLS_QUIC_QUIC_EPOLL_ALARM_FACTORY_H_ |