OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NET_QUIC_QUARTC_QUARTC_AT_EXIT_INTERFACE_H_ |
| 6 #define NET_QUIC_QUARTC_QUARTC_AT_EXIT_INTERFACE_H_ |
| 7 |
| 8 #include "net/base/net_export.h" |
| 9 |
| 10 namespace net { |
| 11 |
| 12 // Used to set and store an AtExitManager to manage the lifetime of the |
| 13 // Singletons in QUIC, such as QuicRandom. |
| 14 class QuartcAtExitManagerInterface { |
| 15 public: |
| 16 virtual ~QuartcAtExitManagerInterface() {} |
| 17 |
| 18 // Creates an instance of AtExitManager to manage the life time of the |
| 19 // Singletons. Only one AtExitManager is expected to be created in one |
| 20 // process. When test_mode is true, more than one AtExitManagers can be |
| 21 // created for one process but it is for unit tests only. |
| 22 virtual void SetAtExitManager(bool test_mode) = 0; |
| 23 }; |
| 24 |
| 25 // Creates an instance of QuartcAtExitManagerInterface. |
| 26 NET_EXPORT_PRIVATE std::unique_ptr<QuartcAtExitManagerInterface> |
| 27 CreateQuartcAtExitManager(); |
| 28 |
| 29 } // namespace net |
| 30 |
| 31 #endif // NET_QUIC_QUARTC_QUARTC_AT_EXIT_INTERFACE_H_ |
OLD | NEW |