tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

goog_cc_factory.h (1396B)


      1 /*
      2 *  Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
      3 *
      4 *  Use of this source code is governed by a BSD-style license
      5 *  that can be found in the LICENSE file in the root of the source
      6 *  tree. An additional intellectual property rights grant can be found
      7 *  in the file PATENTS.  All contributing project authors may
      8 *  be found in the AUTHORS file in the root of the source tree.
      9 */
     10 
     11 #ifndef API_TRANSPORT_GOOG_CC_FACTORY_H_
     12 #define API_TRANSPORT_GOOG_CC_FACTORY_H_
     13 
     14 #include <memory>
     15 
     16 #include "api/network_state_predictor.h"
     17 #include "api/transport/network_control.h"
     18 #include "api/units/time_delta.h"
     19 #include "rtc_base/system/rtc_export.h"
     20 
     21 namespace webrtc {
     22 
     23 struct GoogCcFactoryConfig {
     24  std::unique_ptr<NetworkStateEstimatorFactory> network_state_estimator_factory;
     25  NetworkStatePredictorFactoryInterface* network_state_predictor_factory =
     26      nullptr;
     27 };
     28 
     29 class RTC_EXPORT GoogCcNetworkControllerFactory
     30    : public NetworkControllerFactoryInterface {
     31 public:
     32  GoogCcNetworkControllerFactory() = default;
     33  explicit GoogCcNetworkControllerFactory(GoogCcFactoryConfig config);
     34 
     35  std::unique_ptr<NetworkControllerInterface> Create(
     36      NetworkControllerConfig config) override;
     37  TimeDelta GetProcessInterval() const override;
     38 
     39 private:
     40  GoogCcFactoryConfig factory_config_;
     41 };
     42 
     43 }  // namespace webrtc
     44 
     45 #endif  // API_TRANSPORT_GOOG_CC_FACTORY_H_