Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(510)

Unified Diff: net/quic/quartc/quartc_factory_interface.h

Issue 2324833004: Define Stable API for WebRTC/Quartc (Closed)
Patch Set: Patch Set 4 : Create QuartcFactory. Made modification on the API. Change the constructor of QuartcS… Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698