[email protected] | 1d197ef5 | 2012-11-07 20:41:29 | [diff] [blame] | 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 | // | ||||
Ryan Hamilton | 8d9ee76e | 2018-05-29 23:52:52 | [diff] [blame] | 5 | // The Chrome-specific helper for quic::QuicConnection which uses |
[email protected] | 1d197ef5 | 2012-11-07 20:41:29 | [diff] [blame] | 6 | // a TaskRunner for alarms, and uses a DatagramClientSocket for writing data. |
7 | |||||
Ryan Hamilton | a3ee93a7 | 2018-08-01 22:03:08 | [diff] [blame] | 8 | #ifndef NET_QUIC_QUIC_CHROMIUM_CONNECTION_HELPER_H_ |
9 | #define NET_QUIC_QUIC_CHROMIUM_CONNECTION_HELPER_H_ | ||||
[email protected] | 1d197ef5 | 2012-11-07 20:41:29 | [diff] [blame] | 10 | |
Avi Drissman | 13fc893 | 2015-12-20 04:40:46 | [diff] [blame] | 11 | #include "base/macros.h" |
[email protected] | 1d197ef5 | 2012-11-07 20:41:29 | [diff] [blame] | 12 | #include "net/base/ip_endpoint.h" |
bnc | 81c46c1f | 2016-10-04 16:25:59 | [diff] [blame] | 13 | #include "net/base/net_export.h" |
tfarina | 5dd13c2 | 2016-11-16 12:08:26 | [diff] [blame] | 14 | #include "net/socket/datagram_client_socket.h" |
Ryan Hamilton | 56b10c5d | 2018-05-11 13:40:16 | [diff] [blame] | 15 | #include "net/third_party/quic/core/quic_connection.h" |
16 | #include "net/third_party/quic/core/quic_packets.h" | ||||
17 | #include "net/third_party/quic/core/quic_simple_buffer_allocator.h" | ||||
18 | #include "net/third_party/quic/core/quic_time.h" | ||||
[email protected] | 1d197ef5 | 2012-11-07 20:41:29 | [diff] [blame] | 19 | |
Ryan Hamilton | 8d9ee76e | 2018-05-29 23:52:52 | [diff] [blame] | 20 | namespace quic { |
21 | class QuicClock; | ||||
22 | |||||
23 | class QuicRandom; | ||||
24 | } // namespace quic | ||||
[email protected] | 1d197ef5 | 2012-11-07 20:41:29 | [diff] [blame] | 25 | namespace net { |
26 | |||||
rch | 12fef55 | 2016-01-15 16:26:31 | [diff] [blame] | 27 | class NET_EXPORT_PRIVATE QuicChromiumConnectionHelper |
Ryan Hamilton | 8d9ee76e | 2018-05-29 23:52:52 | [diff] [blame] | 28 | : public quic::QuicConnectionHelperInterface { |
[email protected] | 1d197ef5 | 2012-11-07 20:41:29 | [diff] [blame] | 29 | public: |
Ryan Hamilton | 8d9ee76e | 2018-05-29 23:52:52 | [diff] [blame] | 30 | QuicChromiumConnectionHelper(const quic::QuicClock* clock, |
31 | quic::QuicRandom* random_generator); | ||||
rch | 12fef55 | 2016-01-15 16:26:31 | [diff] [blame] | 32 | ~QuicChromiumConnectionHelper() override; |
[email protected] | 1d197ef5 | 2012-11-07 20:41:29 | [diff] [blame] | 33 | |
Ryan Hamilton | 8d9ee76e | 2018-05-29 23:52:52 | [diff] [blame] | 34 | // quic::QuicConnectionHelperInterface |
35 | const quic::QuicClock* GetClock() const override; | ||||
36 | quic::QuicRandom* GetRandomGenerator() override; | ||||
37 | quic::QuicBufferAllocator* GetStreamSendBufferAllocator() override; | ||||
[email protected] | 1d197ef5 | 2012-11-07 20:41:29 | [diff] [blame] | 38 | |
[email protected] | e13201d8 | 2012-12-12 05:00:32 | [diff] [blame] | 39 | private: |
Ryan Hamilton | 8d9ee76e | 2018-05-29 23:52:52 | [diff] [blame] | 40 | const quic::QuicClock* clock_; |
41 | quic::QuicRandom* random_generator_; | ||||
42 | quic::SimpleBufferAllocator buffer_allocator_; | ||||
[email protected] | 1d197ef5 | 2012-11-07 20:41:29 | [diff] [blame] | 43 | |
rch | 12fef55 | 2016-01-15 16:26:31 | [diff] [blame] | 44 | DISALLOW_COPY_AND_ASSIGN(QuicChromiumConnectionHelper); |
[email protected] | 1d197ef5 | 2012-11-07 20:41:29 | [diff] [blame] | 45 | }; |
46 | |||||
47 | } // namespace net | ||||
48 | |||||
Ryan Hamilton | a3ee93a7 | 2018-08-01 22:03:08 | [diff] [blame] | 49 | #endif // NET_QUIC_QUIC_CHROMIUM_CONNECTION_HELPER_H_ |