| OLD | NEW |
| 1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2017 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_FACTORY_H_ | 5 #ifndef NET_QUIC_QUARTC_QUARTC_FACTORY_H_ |
| 6 #define NET_QUIC_QUARTC_QUARTC_FACTORY_H_ | 6 #define NET_QUIC_QUARTC_QUARTC_FACTORY_H_ |
| 7 | 7 |
| 8 #include "net/quic/core/quic_alarm_factory.h" | 8 #include "net/quic/core/quic_alarm_factory.h" |
| 9 #include "net/quic/core/quic_connection.h" | 9 #include "net/quic/core/quic_connection.h" |
| 10 #include "net/quic/core/quic_simple_buffer_allocator.h" | 10 #include "net/quic/core/quic_simple_buffer_allocator.h" |
| 11 #include "net/quic/quartc/quartc_factory_interface.h" | 11 #include "net/quic/quartc/quartc_factory_interface.h" |
| 12 #include "net/quic/quartc/quartc_packet_writer.h" | 12 #include "net/quic/quartc/quartc_packet_writer.h" |
| 13 #include "net/quic/quartc/quartc_task_runner_interface.h" | 13 #include "net/quic/quartc/quartc_task_runner_interface.h" |
| 14 | 14 |
| 15 namespace net { | 15 namespace net { |
| 16 | 16 |
| 17 // Implements the QuartcFactoryInterface to create the instances of | 17 // Implements the QuartcFactoryInterface to create the instances of |
| 18 // QuartcSessionInterface. Implements the QuicAlarmFactory to create alarms | 18 // QuartcSessionInterface. Implements the QuicAlarmFactory to create alarms |
| 19 // using the QuartcTaskRunner. Implements the QuicConnectionHelperInterface used | 19 // using the QuartcTaskRunner. Implements the QuicConnectionHelperInterface used |
| 20 // by the QuicConnections. Only one QuartcFactory is expected to be created. | 20 // by the QuicConnections. Only one QuartcFactory is expected to be created. |
| 21 class QuartcFactory : public QuartcFactoryInterface, | 21 class QUIC_EXPORT_PRIVATE QuartcFactory : public QuartcFactoryInterface, |
| 22 public QuicAlarmFactory, | 22 public QuicAlarmFactory, |
| 23 public QuicConnectionHelperInterface { | 23 public QuicConnectionHelperInterface { |
| 24 public: | 24 public: |
| 25 QuartcFactory(const QuartcFactoryConfig& factory_config); | 25 QuartcFactory(const QuartcFactoryConfig& factory_config); |
| 26 ~QuartcFactory() override; | 26 ~QuartcFactory() override; |
| 27 | 27 |
| 28 // QuartcFactoryInterface overrides. | 28 // QuartcFactoryInterface overrides. |
| 29 std::unique_ptr<QuartcSessionInterface> CreateQuartcSession( | 29 std::unique_ptr<QuartcSessionInterface> CreateQuartcSession( |
| 30 const QuartcSessionConfig& quartc_session_config) override; | 30 const QuartcSessionConfig& quartc_session_config) override; |
| 31 | 31 |
| 32 // QuicAlarmFactory overrides. | 32 // QuicAlarmFactory overrides. |
| 33 QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override; | 33 QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 53 // Used to implement the QuicConnectionHelperInterface. | 53 // Used to implement the QuicConnectionHelperInterface. |
| 54 // The QuicClock wrapper held in this variable is owned by QuartcFactory, | 54 // The QuicClock wrapper held in this variable is owned by QuartcFactory, |
| 55 // but the QuartcClockInterface inside of it belongs to the user! | 55 // but the QuartcClockInterface inside of it belongs to the user! |
| 56 std::unique_ptr<QuicClock> clock_; | 56 std::unique_ptr<QuicClock> clock_; |
| 57 SimpleBufferAllocator buffer_allocator_; | 57 SimpleBufferAllocator buffer_allocator_; |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 } // namespace net | 60 } // namespace net |
| 61 | 61 |
| 62 #endif // NET_QUIC_QUARTC_QUARTC_FACTORY_H_ | 62 #endif // NET_QUIC_QUARTC_QUARTC_FACTORY_H_ |
| OLD | NEW |