OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 // The Chrome-specific helper for QuicConnection which uses | 5 // The Chrome-specific helper for QuicConnection which uses |
6 // a TaskRunner for alarms, and uses a DatagramClientSocket for writing data. | 6 // a TaskRunner for alarms, and uses a DatagramClientSocket for writing data. |
7 | 7 |
8 #ifndef NET_QUIC_QUIC_CHROMIUM_CONNECTION_HELPER_H_ | 8 #ifndef NET_QUIC_QUIC_CHROMIUM_CONNECTION_HELPER_H_ |
9 #define NET_QUIC_QUIC_CHROMIUM_CONNECTION_HELPER_H_ | 9 #define NET_QUIC_QUIC_CHROMIUM_CONNECTION_HELPER_H_ |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "net/base/ip_endpoint.h" | 12 #include "net/base/ip_endpoint.h" |
13 #include "net/base/net_export.h" | 13 #include "net/base/net_export.h" |
14 #include "net/quic/core/quic_connection.h" | 14 #include "net/quic/core/quic_connection.h" |
15 #include "net/quic/core/quic_protocol.h" | 15 #include "net/quic/core/quic_protocol.h" |
16 #include "net/quic/core/quic_simple_buffer_allocator.h" | 16 #include "net/quic/core/quic_simple_buffer_allocator.h" |
17 #include "net/quic/core/quic_time.h" | 17 #include "net/quic/core/quic_time.h" |
18 #include "net/udp/datagram_client_socket.h" | 18 #include "net/socket/datagram_client_socket.h" |
19 | 19 |
20 namespace net { | 20 namespace net { |
21 | 21 |
22 class QuicClock; | 22 class QuicClock; |
23 class QuicRandom; | 23 class QuicRandom; |
24 | 24 |
25 class NET_EXPORT_PRIVATE QuicChromiumConnectionHelper | 25 class NET_EXPORT_PRIVATE QuicChromiumConnectionHelper |
26 : public QuicConnectionHelperInterface { | 26 : public QuicConnectionHelperInterface { |
27 public: | 27 public: |
28 QuicChromiumConnectionHelper(const QuicClock* clock, | 28 QuicChromiumConnectionHelper(const QuicClock* clock, |
29 QuicRandom* random_generator); | 29 QuicRandom* random_generator); |
30 ~QuicChromiumConnectionHelper() override; | 30 ~QuicChromiumConnectionHelper() override; |
31 | 31 |
32 // QuicConnectionHelperInterface | 32 // QuicConnectionHelperInterface |
33 const QuicClock* GetClock() const override; | 33 const QuicClock* GetClock() const override; |
34 QuicRandom* GetRandomGenerator() override; | 34 QuicRandom* GetRandomGenerator() override; |
35 QuicBufferAllocator* GetBufferAllocator() override; | 35 QuicBufferAllocator* GetBufferAllocator() override; |
36 | 36 |
37 private: | 37 private: |
38 const QuicClock* clock_; | 38 const QuicClock* clock_; |
39 QuicRandom* random_generator_; | 39 QuicRandom* random_generator_; |
40 SimpleBufferAllocator buffer_allocator_; | 40 SimpleBufferAllocator buffer_allocator_; |
41 | 41 |
42 DISALLOW_COPY_AND_ASSIGN(QuicChromiumConnectionHelper); | 42 DISALLOW_COPY_AND_ASSIGN(QuicChromiumConnectionHelper); |
43 }; | 43 }; |
44 | 44 |
45 } // namespace net | 45 } // namespace net |
46 | 46 |
47 #endif // NET_QUIC_QUIC_CHROMIUM_CONNECTION_HELPER_H_ | 47 #endif // NET_QUIC_QUIC_CHROMIUM_CONNECTION_HELPER_H_ |
OLD | NEW |