Chromium Code Reviews| Index: net/quic/quartc/quartc_factory_interface.h |
| diff --git a/net/quic/quartc/quartc_factory_interface.h b/net/quic/quartc/quartc_factory_interface.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..31b8e557942218e4e5ef8b4764cc65d13e219e4c |
| --- /dev/null |
| +++ b/net/quic/quartc/quartc_factory_interface.h |
| @@ -0,0 +1,32 @@ |
| +// Copyright (c) 2016 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. |
| + |
| +#ifndef NET_QUIC_QUARTC_QUARTC_FACTORY_INTERFACE_H_ |
| +#define NET_QUIC_QUARTC_QUARTC_FACTORY_INTERFACE_H_ |
| + |
| +#include "net/quic/quartc/quartc_session_interface.h" |
| + |
| +namespace net { |
| +class QuartcFactoryInterface { |
|
Ryan Hamilton
2016/09/23 19:56:43
nit: comments and newlines, please.
zhihuang1
2016/09/24 06:54:05
Done.
|
| + public: |
| + struct QuartcConfig { |
| + // Used to determine the perspective of the session. |
| + bool is_server = false; |
| + // Used for creating a unique server ID. Only used by the client side. |
|
Ryan Hamilton
2016/09/23 19:56:43
The phrasing of this comment is confused to me, bu
zhihuang1
2016/09/24 06:54:05
Done.
|
| + std::string remote_fingerprint_value; |
| + // Used for creating a QuartcPacketWriter for QuicConnection which is |
| + // required when creating a QuartcSession. |
| + QuartcSessionInterface::Transport* transport = nullptr; |
| + }; |
| + |
| + virtual std::unique_ptr<QuartcSessionInterface> CreateQuartcSession( |
| + const QuartcConfig& quartc_config) = 0; |
|
Ryan Hamilton
2016/09/23 19:56:43
Can you comment on the ownership of quartc_config.
zhihuang1
2016/09/24 06:54:05
Done.
|
| +}; |
| + |
| +// Creates a new instance of QuartcFactoryInterface. |
| +std::unique_ptr<QuartcFactoryInterface> CreateQuartcFactory(); |
| + |
| +} // namepace net |
| + |
| +#endif // NET_QUIC_QUARTC_QUARTC_FACTORY_INTERFACE_H_ |