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

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

Issue 2324833004: Define Stable API for WebRTC/Quartc (Closed)
Patch Set: Fix the issues when testing with WebRTC. Created 4 years, 2 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_at_exit_interface.h
diff --git a/net/quic/quartc/quartc_at_exit_interface.h b/net/quic/quartc/quartc_at_exit_interface.h
new file mode 100644
index 0000000000000000000000000000000000000000..a18d511d046f8977b4aa765ee4690101cbf8a2d5
--- /dev/null
+++ b/net/quic/quartc/quartc_at_exit_interface.h
@@ -0,0 +1,31 @@
+// 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_AT_EXIT_INTERFACE_H_
+#define NET_QUIC_QUARTC_QUARTC_AT_EXIT_INTERFACE_H_
+
+#include "net/base/net_export.h"
+
+namespace net {
+
+// Used to set and store an AtExitManager to manage the lifetime of the
+// Singletons in QUIC, such as QuicRandom.
+class QuartcAtExitManagerInterface {
+ public:
+ virtual ~QuartcAtExitManagerInterface() {}
+
+ // Creates an instance of AtExitManager to manage the life time of the
+ // Singletons. Only one AtExitManager is expected to be created in one
+ // process. When test_mode is true, more than one AtExitManagers can be
+ // created for one process but it is for unit tests only.
+ virtual void SetAtExitManager(bool test_mode) = 0;
+};
+
+// Creates an instance of QuartcAtExitManagerInterface.
+NET_EXPORT_PRIVATE std::unique_ptr<QuartcAtExitManagerInterface>
+CreateQuartcAtExitManager();
+
+} // namespace net
+
+#endif // NET_QUIC_QUARTC_QUARTC_AT_EXIT_INTERFACE_H_

Powered by Google App Engine
This is Rietveld 408576698