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..fea73a9d0a923fbd92351a157dae61a3543c0b0a |
| --- /dev/null |
| +++ b/net/quic/quartc/quartc_factory_interface.h |
| @@ -0,0 +1,39 @@ |
| +// 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 { |
| + |
| +// Used to create instances for QuartcSession. |
|
pthatcher2
2016/10/05 22:12:06
Either we should call it QuartcSessionFactory or t
zhihuang1
2016/10/13 06:22:39
Done.
|
| +class QuartcFactoryInterface { |
| + public: |
| + virtual ~QuartcFactoryInterface() {} |
| + |
| + // This struct contains the required parameters to create a QuartcSession. |
|
pthatcher2
2016/10/05 22:12:05
You can probably just remove this comment.
zhihuang1
2016/10/13 06:22:39
Done.
|
| + struct QuartcConfig { |
|
pthatcher2
2016/10/05 22:12:05
Shouldn't this be named QuartcSessionConfig?
zhihuang1
2016/10/13 06:22:39
Done.
|
| + // Used to determine the perspective of the session. |
|
pthatcher2
2016/10/05 22:12:06
This could be more clear by saying something like
zhihuang1
2016/10/13 06:22:39
I think this should be something like "The QuartcS
|
| + bool is_server = false; |
| + // Used by the client to create a unique server ID for the |
| + // QuicCryptoClientStream when doing crypto handshake. |
| + std::string remote_fingerprint_value; |
|
pthatcher2
2016/10/05 22:12:06
Why not something like "unique_remote_server_id"
zhihuang1
2016/10/13 06:22:39
Done.
|
| + // Used for creating a QuartcPacketWriter for QuicConnection, which is |
| + // required when creating a QuartcSession. The QuartcPacketWriter will not |
| + // take ownership of it. |
|
pthatcher2
2016/10/05 22:12:06
A better comment would be something like "The way
|
| + QuartcSessionInterface::Transport* transport = nullptr; |
|
pthatcher2
2016/10/05 22:12:06
Can we call this a QuartcSessionInterface::PacketT
zhihuang1
2016/10/13 06:22:40
Done.
|
| + }; |
| + |
| + virtual std::unique_ptr<QuartcSessionInterface> CreateQuartcSession( |
| + const QuartcConfig& quartc_config) = 0; |
| +}; |
| + |
| +// Creates a new instance of QuartcFactoryInterface. |
| +std::unique_ptr<QuartcFactoryInterface> CreateQuartcFactory(); |
| + |
| +} // namepace net |
| + |
| +#endif // NET_QUIC_QUARTC_QUARTC_FACTORY_INTERFACE_H_ |