Moves network control interface to API.

This prepares for allowing injection of a network controller.

Bug: webrtc:9155
Change-Id: I5624f47738db9c5cd4750eac76cb6289e06a7aa3
Reviewed-on: https://webrtc-review.googlesource.com/73100
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23188}
diff --git a/api/transport/BUILD.gn b/api/transport/BUILD.gn
index 4d29d75..bd5dcac 100644
--- a/api/transport/BUILD.gn
+++ b/api/transport/BUILD.gn
@@ -18,3 +18,37 @@
     "..:optional",
   ]
 }
+
+rtc_static_library("network_control") {
+  sources = [
+    "network_control.h",
+    "network_types.cc",
+    "network_types.h",
+  ]
+
+  deps = [
+    "..:optional",
+    "../units:data_rate",
+    "../units:data_size",
+    "../units:time_delta",
+    "../units:timestamp",
+  ]
+}
+
+if (rtc_include_tests) {
+  rtc_source_set("network_control_test") {
+    testonly = true
+    sources = [
+      "test/mock_network_control.h",
+      "test/network_control_tester.cc",
+      "test/network_control_tester.h",
+    ]
+    deps = [
+      ":network_control",
+      "../:optional",
+      "../../rtc_base:checks",
+      "../../rtc_base:rtc_base_approved",
+      "../../test:test_support",
+    ]
+  }
+}
diff --git a/modules/congestion_controller/network_control/include/network_control.h b/api/transport/network_control.h
similarity index 92%
rename from modules/congestion_controller/network_control/include/network_control.h
rename to api/transport/network_control.h
index 8a54706..abd945d 100644
--- a/modules/congestion_controller/network_control/include/network_control.h
+++ b/api/transport/network_control.h
@@ -8,12 +8,12 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef MODULES_CONGESTION_CONTROLLER_NETWORK_CONTROL_INCLUDE_NETWORK_CONTROL_H_
-#define MODULES_CONGESTION_CONTROLLER_NETWORK_CONTROL_INCLUDE_NETWORK_CONTROL_H_
+#ifndef API_TRANSPORT_NETWORK_CONTROL_H_
+#define API_TRANSPORT_NETWORK_CONTROL_H_
 #include <stdint.h>
 #include <memory>
 
-#include "modules/congestion_controller/network_control/include/network_types.h"
+#include "api/transport/network_types.h"
 
 namespace webrtc {
 
@@ -78,6 +78,8 @@
 // controller.
 class NetworkControllerFactoryInterface {
  public:
+  virtual ~NetworkControllerFactoryInterface() = default;
+
   // Used to create a new network controller, requires an observer to be
   // provided to handle callbacks.
   virtual std::unique_ptr<NetworkControllerInterface> Create(
@@ -85,8 +87,7 @@
   // Returns the interval by which the network controller expects
   // OnProcessInterval calls.
   virtual TimeDelta GetProcessInterval() const = 0;
-  virtual ~NetworkControllerFactoryInterface() = default;
 };
 }  // namespace webrtc
 
-#endif  // MODULES_CONGESTION_CONTROLLER_NETWORK_CONTROL_INCLUDE_NETWORK_CONTROL_H_
+#endif  // API_TRANSPORT_NETWORK_CONTROL_H_
diff --git a/modules/congestion_controller/network_control/network_types.cc b/api/transport/network_types.cc
similarity index 75%
rename from modules/congestion_controller/network_control/network_types.cc
rename to api/transport/network_types.cc
index f354bf3..b4c09d4 100644
--- a/modules/congestion_controller/network_control/network_types.cc
+++ b/api/transport/network_types.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "modules/congestion_controller/network_control/include/network_types.h"
+#include "api/transport/network_types.h"
 
 namespace webrtc {
 
@@ -65,4 +65,20 @@
     default;
 NetworkControlUpdate::~NetworkControlUpdate() = default;
 
+PacedPacketInfo::PacedPacketInfo() = default;
+
+PacedPacketInfo::PacedPacketInfo(int probe_cluster_id,
+                                 int probe_cluster_min_probes,
+                                 int probe_cluster_min_bytes)
+    : probe_cluster_id(probe_cluster_id),
+      probe_cluster_min_probes(probe_cluster_min_probes),
+      probe_cluster_min_bytes(probe_cluster_min_bytes) {}
+
+bool PacedPacketInfo::operator==(const PacedPacketInfo& rhs) const {
+  return send_bitrate_bps == rhs.send_bitrate_bps &&
+         probe_cluster_id == rhs.probe_cluster_id &&
+         probe_cluster_min_probes == rhs.probe_cluster_min_probes &&
+         probe_cluster_min_bytes == rhs.probe_cluster_min_bytes;
+}
+
 }  // namespace webrtc
diff --git a/modules/congestion_controller/network_control/include/network_types.h b/api/transport/network_types.h
similarity index 88%
rename from modules/congestion_controller/network_control/include/network_types.h
rename to api/transport/network_types.h
index 8a1a16c..a4d4638 100644
--- a/modules/congestion_controller/network_control/include/network_types.h
+++ b/api/transport/network_types.h
@@ -8,17 +8,16 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef MODULES_CONGESTION_CONTROLLER_NETWORK_CONTROL_INCLUDE_NETWORK_TYPES_H_
-#define MODULES_CONGESTION_CONTROLLER_NETWORK_CONTROL_INCLUDE_NETWORK_TYPES_H_
+#ifndef API_TRANSPORT_NETWORK_TYPES_H_
+#define API_TRANSPORT_NETWORK_TYPES_H_
 #include <stdint.h>
 #include <vector>
 
+#include "api/optional.h"
 #include "api/units/data_rate.h"
 #include "api/units/data_size.h"
 #include "api/units/time_delta.h"
 #include "api/units/timestamp.h"
-#include "modules/include/module_common_types.h"
-#include "rtc_base/constructormagic.h"
 
 namespace webrtc {
 
@@ -66,6 +65,22 @@
   rtc::Optional<DataRate> starting_rate;
 };
 
+struct PacedPacketInfo {
+  PacedPacketInfo();
+  PacedPacketInfo(int probe_cluster_id,
+                  int probe_cluster_min_probes,
+                  int probe_cluster_min_bytes);
+
+  bool operator==(const PacedPacketInfo& rhs) const;
+
+  // TODO(srte): Move probing info to a separate, optional struct.
+  static constexpr int kNotAProbe = -1;
+  int send_bitrate_bps = -1;
+  int probe_cluster_id = kNotAProbe;
+  int probe_cluster_min_probes = -1;
+  int probe_cluster_min_bytes = -1;
+};
+
 struct SentPacket {
   Timestamp send_time = Timestamp::Infinity();
   DataSize size = DataSize::Zero();
@@ -176,4 +191,4 @@
 };
 }  // namespace webrtc
 
-#endif  // MODULES_CONGESTION_CONTROLLER_NETWORK_CONTROL_INCLUDE_NETWORK_TYPES_H_
+#endif  // API_TRANSPORT_NETWORK_TYPES_H_
diff --git a/modules/congestion_controller/network_control/test/mock_network_control.h b/api/transport/test/mock_network_control.h
similarity index 66%
rename from modules/congestion_controller/network_control/test/mock_network_control.h
rename to api/transport/test/mock_network_control.h
index dddcdd1..df83791 100644
--- a/modules/congestion_controller/network_control/test/mock_network_control.h
+++ b/api/transport/test/mock_network_control.h
@@ -8,10 +8,10 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef MODULES_CONGESTION_CONTROLLER_NETWORK_CONTROL_TEST_MOCK_NETWORK_CONTROL_H_
-#define MODULES_CONGESTION_CONTROLLER_NETWORK_CONTROL_TEST_MOCK_NETWORK_CONTROL_H_
+#ifndef API_TRANSPORT_TEST_MOCK_NETWORK_CONTROL_H_
+#define API_TRANSPORT_TEST_MOCK_NETWORK_CONTROL_H_
 
-#include "modules/congestion_controller/network_control/include/network_control.h"
+#include "api/transport/include/network_control.h"
 #include "test/gmock.h"
 
 namespace webrtc {
@@ -23,4 +23,4 @@
 }  // namespace test
 }  // namespace webrtc
 
-#endif  // MODULES_CONGESTION_CONTROLLER_NETWORK_CONTROL_TEST_MOCK_NETWORK_CONTROL_H_
+#endif  // API_TRANSPORT_TEST_MOCK_NETWORK_CONTROL_H_
diff --git a/modules/congestion_controller/network_control/test/network_control_tester.cc b/api/transport/test/network_control_tester.cc
similarity index 96%
rename from modules/congestion_controller/network_control/test/network_control_tester.cc
rename to api/transport/test/network_control_tester.cc
index 29b6211..a34292e 100644
--- a/modules/congestion_controller/network_control/test/network_control_tester.cc
+++ b/api/transport/test/network_control_tester.cc
@@ -8,11 +8,11 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "modules/congestion_controller/network_control/test/network_control_tester.h"
+#include "api/transport/test/network_control_tester.h"
 
 #include <algorithm>
 
-#include "modules/congestion_controller/network_control/include/network_control.h"
+#include "api/transport/network_control.h"
 #include "rtc_base/logging.h"
 
 namespace webrtc {
diff --git a/modules/congestion_controller/network_control/test/network_control_tester.h b/api/transport/test/network_control_tester.h
similarity index 88%
rename from modules/congestion_controller/network_control/test/network_control_tester.h
rename to api/transport/test/network_control_tester.h
index f91f016..43c6503 100644
--- a/modules/congestion_controller/network_control/test/network_control_tester.h
+++ b/api/transport/test/network_control_tester.h
@@ -8,15 +8,15 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef MODULES_CONGESTION_CONTROLLER_NETWORK_CONTROL_TEST_NETWORK_CONTROL_TESTER_H_
-#define MODULES_CONGESTION_CONTROLLER_NETWORK_CONTROL_TEST_NETWORK_CONTROL_TESTER_H_
+#ifndef API_TRANSPORT_TEST_NETWORK_CONTROL_TESTER_H_
+#define API_TRANSPORT_TEST_NETWORK_CONTROL_TESTER_H_
 
 #include <deque>
 #include <functional>
 #include <memory>
 
 #include "api/optional.h"
-#include "modules/congestion_controller/network_control/include/network_control.h"
+#include "api/transport/network_control.h"
 
 namespace webrtc {
 namespace test {
@@ -73,4 +73,4 @@
 }  // namespace test
 }  // namespace webrtc
 
-#endif  // MODULES_CONGESTION_CONTROLLER_NETWORK_CONTROL_TEST_NETWORK_CONTROL_TESTER_H_
+#endif  // API_TRANSPORT_TEST_NETWORK_CONTROL_TESTER_H_
diff --git a/call/BUILD.gn b/call/BUILD.gn
index 5be4636..19ee903 100644
--- a/call/BUILD.gn
+++ b/call/BUILD.gn
@@ -103,8 +103,8 @@
     ":bitrate_configurator",
     ":rtp_interfaces",
     "..:webrtc_common",
+    "../api/transport:network_control",
     "../modules/congestion_controller",
-    "../modules/congestion_controller/network_control",
     "../modules/congestion_controller/rtp:congestion_controller",
     "../modules/pacing",
     "../modules/utility",
@@ -178,6 +178,7 @@
     "../api:callfactory_api",
     "../api:optional",
     "../api:transport_api",
+    "../api/transport:network_control",
     "../audio",
     "../logging:rtc_event_audio",
     "../logging:rtc_event_log_api",
@@ -186,7 +187,6 @@
     "../logging:rtc_stream_config",
     "../modules/bitrate_controller",
     "../modules/congestion_controller",
-    "../modules/congestion_controller/network_control",
     "../modules/pacing",
     "../modules/rtp_rtcp",
     "../modules/rtp_rtcp:rtp_rtcp_format",
diff --git a/call/call.cc b/call/call.cc
index aadc27e..3635bf2 100644
--- a/call/call.cc
+++ b/call/call.cc
@@ -17,6 +17,7 @@
 #include <vector>
 
 #include "api/optional.h"
+#include "api/transport/network_control.h"
 #include "audio/audio_receive_stream.h"
 #include "audio/audio_send_stream.h"
 #include "audio/audio_state.h"
@@ -37,7 +38,6 @@
 #include "logging/rtc_event_log/rtc_stream_config.h"
 #include "modules/bitrate_controller/include/bitrate_controller.h"
 #include "modules/congestion_controller/include/receive_side_congestion_controller.h"
-#include "modules/congestion_controller/network_control/include/network_control.h"
 #include "modules/rtp_rtcp/include/flexfec_receiver.h"
 #include "modules/rtp_rtcp/include/rtp_header_extension_map.h"
 #include "modules/rtp_rtcp/include/rtp_header_parser.h"
@@ -54,8 +54,8 @@
 #include "rtc_base/ptr_util.h"
 #include "rtc_base/rate_limiter.h"
 #include "rtc_base/sequenced_task_checker.h"
-#include "rtc_base/synchronization/rw_lock_wrapper.h"
 #include "rtc_base/strings/string_builder.h"
+#include "rtc_base/synchronization/rw_lock_wrapper.h"
 #include "rtc_base/task_queue.h"
 #include "rtc_base/thread_annotations.h"
 #include "rtc_base/trace_event.h"
diff --git a/modules/BUILD.gn b/modules/BUILD.gn
index 39a609a..0182584 100644
--- a/modules/BUILD.gn
+++ b/modules/BUILD.gn
@@ -56,6 +56,7 @@
     "../api:optional",
     "../api:video_frame_api",
     "../api:video_frame_api_i420",
+    "../api/transport:network_control",
     "../rtc_base:deprecation",
     "../rtc_base:rtc_base_approved",
     "video_coding:codec_globals_headers",
diff --git a/modules/congestion_controller/BUILD.gn b/modules/congestion_controller/BUILD.gn
index 3028e18..d5da37c 100644
--- a/modules/congestion_controller/BUILD.gn
+++ b/modules/congestion_controller/BUILD.gn
@@ -185,7 +185,6 @@
       "../rtp_rtcp:rtp_rtcp_format",
       "bbr:bbr_unittests",
       "goog_cc:goog_cc_unittests",
-      "network_control:network_control_unittests",
       "rtp:congestion_controller_unittests",
     ]
     if (!build_with_chromium && is_clang) {
diff --git a/modules/congestion_controller/bbr/BUILD.gn b/modules/congestion_controller/bbr/BUILD.gn
index 3abebaa..c8ff076 100644
--- a/modules/congestion_controller/bbr/BUILD.gn
+++ b/modules/congestion_controller/bbr/BUILD.gn
@@ -15,8 +15,8 @@
   ]
   deps = [
     ":bbr_controller",
+    "../../../api/transport:network_control",
     "../../../rtc_base:rtc_base_approved",
-    "../network_control",
   ]
 }
 
@@ -31,11 +31,11 @@
     ":rtt_stats",
     ":windowed_filter",
     "../../../api:optional",
+    "../../../api/transport:network_control",
     "../../../rtc_base:checks",
     "../../../rtc_base:rtc_base_approved",
     "../../../rtc_base/experiments:congestion_controller_experiment",
     "../../../rtc_base/system:fallthrough",
-    "../network_control",
   ]
 }
 rtc_source_set("data_transfer_tracker") {
@@ -85,10 +85,10 @@
       ":data_transfer_tracker",
       ":rtt_stats",
       ":windowed_filter",
+      "../../../api/transport:network_control_test",
       "../../../api/units:data_rate",
       "../../../api/units:time_delta",
       "../../../test:test_support",
-      "../network_control:network_control_test",
     ]
     if (!build_with_chromium && is_clang) {
       # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
diff --git a/modules/congestion_controller/bbr/bbr_factory.h b/modules/congestion_controller/bbr/bbr_factory.h
index d740d69..ad539c8 100644
--- a/modules/congestion_controller/bbr/bbr_factory.h
+++ b/modules/congestion_controller/bbr/bbr_factory.h
@@ -13,7 +13,7 @@
 
 #include <memory>
 
-#include "modules/congestion_controller/network_control/include/network_control.h"
+#include "api/transport/network_control.h"
 
 namespace webrtc {
 
diff --git a/modules/congestion_controller/bbr/bbr_network_controller.h b/modules/congestion_controller/bbr/bbr_network_controller.h
index 5b96961..34d76bb 100644
--- a/modules/congestion_controller/bbr/bbr_network_controller.h
+++ b/modules/congestion_controller/bbr/bbr_network_controller.h
@@ -18,11 +18,11 @@
 #include <string>
 #include <vector>
 
+#include "api/transport/network_control.h"
+#include "api/transport/network_types.h"
 #include "modules/congestion_controller/bbr/data_transfer_tracker.h"
 #include "modules/congestion_controller/bbr/rtt_stats.h"
 #include "modules/congestion_controller/bbr/windowed_filter.h"
-#include "modules/congestion_controller/network_control/include/network_control.h"
-#include "modules/congestion_controller/network_control/include/network_types.h"
 
 #include "api/optional.h"
 #include "rtc_base/random.h"
diff --git a/modules/congestion_controller/bbr/bbr_network_controller_unittest.cc b/modules/congestion_controller/bbr/bbr_network_controller_unittest.cc
index 4ee63b6..68bc8ce 100644
--- a/modules/congestion_controller/bbr/bbr_network_controller_unittest.cc
+++ b/modules/congestion_controller/bbr/bbr_network_controller_unittest.cc
@@ -11,9 +11,9 @@
 #include <algorithm>
 #include <memory>
 
+#include "api/transport/test/network_control_tester.h"
 #include "modules/congestion_controller/bbr/bbr_factory.h"
 #include "modules/congestion_controller/bbr/bbr_network_controller.h"
-#include "modules/congestion_controller/network_control/test/network_control_tester.h"
 #include "test/gmock.h"
 #include "test/gtest.h"
 
diff --git a/modules/congestion_controller/goog_cc/BUILD.gn b/modules/congestion_controller/goog_cc/BUILD.gn
index 858a880..789770a 100644
--- a/modules/congestion_controller/goog_cc/BUILD.gn
+++ b/modules/congestion_controller/goog_cc/BUILD.gn
@@ -44,6 +44,7 @@
     "../../..:webrtc_common",
     "../../../:typedefs",
     "../../../api:optional",
+    "../../../api/transport:network_control",
     "../../../logging:rtc_event_log_api",
     "../../../logging:rtc_event_pacing",
     "../../../rtc_base:checks",
@@ -56,7 +57,6 @@
     "../../pacing",
     "../../remote_bitrate_estimator",
     "../../rtp_rtcp:rtp_rtcp_format",
-    "../network_control",
   ]
 }
 
@@ -144,6 +144,8 @@
       ":delay_based_bwe",
       ":estimators",
       ":goog_cc",
+      "../../../api/transport:network_control",
+      "../../../api/transport:network_control_test",
       "../../../rtc_base:checks",
       "../../../rtc_base:rtc_base_approved",
       "../../../rtc_base:rtc_base_tests_utils",
@@ -154,8 +156,6 @@
       "../../pacing",
       "../../remote_bitrate_estimator",
       "../../rtp_rtcp:rtp_rtcp_format",
-      "../network_control",
-      "../network_control:network_control_test",
       "//testing/gmock",
     ]
     if (!build_with_chromium && is_clang) {
diff --git a/modules/congestion_controller/goog_cc/goog_cc_network_control.h b/modules/congestion_controller/goog_cc/goog_cc_network_control.h
index 498edc3..f7039f0 100644
--- a/modules/congestion_controller/goog_cc/goog_cc_network_control.h
+++ b/modules/congestion_controller/goog_cc/goog_cc_network_control.h
@@ -17,13 +17,13 @@
 #include <vector>
 
 #include "api/optional.h"
+#include "api/transport/network_control.h"
 #include "logging/rtc_event_log/rtc_event_log.h"
 #include "modules/bitrate_controller/send_side_bandwidth_estimation.h"
 #include "modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator.h"
 #include "modules/congestion_controller/goog_cc/alr_detector.h"
 #include "modules/congestion_controller/goog_cc/delay_based_bwe.h"
 #include "modules/congestion_controller/goog_cc/probe_controller.h"
-#include "modules/congestion_controller/network_control/include/network_control.h"
 #include "rtc_base/constructormagic.h"
 
 namespace webrtc {
diff --git a/modules/congestion_controller/goog_cc/include/goog_cc_factory.h b/modules/congestion_controller/goog_cc/include/goog_cc_factory.h
index 29555a1..f4eea11 100644
--- a/modules/congestion_controller/goog_cc/include/goog_cc_factory.h
+++ b/modules/congestion_controller/goog_cc/include/goog_cc_factory.h
@@ -12,7 +12,7 @@
 #define MODULES_CONGESTION_CONTROLLER_GOOG_CC_INCLUDE_GOOG_CC_FACTORY_H_
 #include <memory>
 
-#include "modules/congestion_controller/network_control/include/network_control.h"
+#include "api/transport/network_control.h"
 
 namespace webrtc {
 class Clock;
diff --git a/modules/congestion_controller/goog_cc/probe_controller.h b/modules/congestion_controller/goog_cc/probe_controller.h
index baa3736..163ccb2 100644
--- a/modules/congestion_controller/goog_cc/probe_controller.h
+++ b/modules/congestion_controller/goog_cc/probe_controller.h
@@ -17,7 +17,8 @@
 #include <vector>
 
 #include "api/optional.h"
-#include "modules/congestion_controller/network_control/include/network_control.h"
+#include "api/transport/network_control.h"
+#include "rtc_base/constructormagic.h"
 
 namespace webrtc {
 
diff --git a/modules/congestion_controller/goog_cc/probe_controller_unittest.cc b/modules/congestion_controller/goog_cc/probe_controller_unittest.cc
index 470c2b8..4a61e67 100644
--- a/modules/congestion_controller/goog_cc/probe_controller_unittest.cc
+++ b/modules/congestion_controller/goog_cc/probe_controller_unittest.cc
@@ -9,8 +9,8 @@
  */
 #include <memory>
 
+#include "api/transport/network_types.h"
 #include "modules/congestion_controller/goog_cc/probe_controller.h"
-#include "modules/congestion_controller/network_control/include/network_types.h"
 #include "rtc_base/logging.h"
 #include "system_wrappers/include/clock.h"
 #include "test/gmock.h"
diff --git a/modules/congestion_controller/network_control/BUILD.gn b/modules/congestion_controller/network_control/BUILD.gn
deleted file mode 100644
index 190d662..0000000
--- a/modules/congestion_controller/network_control/BUILD.gn
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS.  All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-import("../../../webrtc.gni")
-
-rtc_static_library("network_control") {
-  sources = [
-    "include/network_control.h",
-    "include/network_types.h",
-    "network_types.cc",
-  ]
-
-  deps = [
-    "../../:module_api",
-    "../../../api:optional",
-    "../../../api/units:data_rate",
-    "../../../api/units:data_size",
-    "../../../api/units:time_delta",
-    "../../../api/units:timestamp",
-    "../../../rtc_base:checks",
-    "../../../rtc_base:rtc_base_approved",
-  ]
-}
-
-if (rtc_include_tests) {
-  rtc_source_set("network_control_test") {
-    testonly = true
-    sources = [
-      "test/mock_network_control.h",
-      "test/network_control_tester.cc",
-      "test/network_control_tester.h",
-    ]
-    deps = [
-      ":network_control",
-      "../../../api:optional",
-      "../../../rtc_base:checks",
-      "../../../rtc_base:rtc_base_approved",
-      "../../../test:test_support",
-    ]
-  }
-  rtc_source_set("network_control_unittests") {
-    testonly = true
-    sources = []
-    deps = [
-      ":network_control",
-      "../../../test:test_support",
-    ]
-  }
-}
diff --git a/modules/congestion_controller/rtp/BUILD.gn b/modules/congestion_controller/rtp/BUILD.gn
index bae6053..02c3245 100644
--- a/modules/congestion_controller/rtp/BUILD.gn
+++ b/modules/congestion_controller/rtp/BUILD.gn
@@ -39,6 +39,7 @@
     "../:congestion_controller",
     "../..:module_api",
     "../../..:webrtc_common",
+    "../../../api/transport:network_control",
     "../../../rtc_base:checks",
     "../../../rtc_base:rate_limiter",
     "../../../rtc_base:rtc_task_queue_api",
@@ -54,7 +55,6 @@
     "../../rtp_rtcp:rtp_rtcp_format",
     "../bbr",
     "../goog_cc",
-    "../network_control",
   ]
 
   if (!build_with_mozilla) {
@@ -96,6 +96,7 @@
       ":transport_feedback",
       "../:congestion_controller",
       "../:mock_congestion_controller",
+      "../../../api/transport:network_control",
       "../../../logging:mocks",
       "../../../rtc_base:checks",
       "../../../rtc_base:rtc_base",
@@ -109,7 +110,6 @@
       "../../pacing:pacing",
       "../../remote_bitrate_estimator:remote_bitrate_estimator",
       "../../rtp_rtcp:rtp_rtcp_format",
-      "../network_control",
       "//testing/gmock",
     ]
     if (!build_with_chromium && is_clang) {
diff --git a/modules/congestion_controller/rtp/include/send_side_congestion_controller.h b/modules/congestion_controller/rtp/include/send_side_congestion_controller.h
index 90447e6..a273bbe 100644
--- a/modules/congestion_controller/rtp/include/send_side_congestion_controller.h
+++ b/modules/congestion_controller/rtp/include/send_side_congestion_controller.h
@@ -17,10 +17,10 @@
 #include <memory>
 #include <vector>
 
+#include "api/transport/network_control.h"
+#include "api/transport/network_types.h"
 #include "common_types.h"  // NOLINT(build/include)
 #include "modules/congestion_controller/include/send_side_congestion_controller_interface.h"
-#include "modules/congestion_controller/network_control/include/network_control.h"
-#include "modules/congestion_controller/network_control/include/network_types.h"
 #include "modules/congestion_controller/rtp/pacer_controller.h"
 #include "modules/congestion_controller/rtp/transport_feedback_adapter.h"
 #include "modules/include/module.h"
diff --git a/modules/congestion_controller/rtp/pacer_controller.h b/modules/congestion_controller/rtp/pacer_controller.h
index 278fa61..27760c4 100644
--- a/modules/congestion_controller/rtp/pacer_controller.h
+++ b/modules/congestion_controller/rtp/pacer_controller.h
@@ -13,7 +13,7 @@
 
 #include <memory>
 
-#include "modules/congestion_controller/network_control/include/network_types.h"
+#include "api/transport/network_types.h"
 #include "modules/pacing/paced_sender.h"
 #include "rtc_base/sequenced_task_checker.h"
 
diff --git a/modules/congestion_controller/rtp/send_side_congestion_controller.cc b/modules/congestion_controller/rtp/send_side_congestion_controller.cc
index a55beae..6d3f301 100644
--- a/modules/congestion_controller/rtp/send_side_congestion_controller.cc
+++ b/modules/congestion_controller/rtp/send_side_congestion_controller.cc
@@ -14,9 +14,9 @@
 #include <functional>
 #include <memory>
 #include <vector>
+#include "api/transport/network_types.h"
 #include "modules/congestion_controller/bbr/bbr_factory.h"
 #include "modules/congestion_controller/goog_cc/include/goog_cc_factory.h"
-#include "modules/congestion_controller/network_control/include/network_types.h"
 #include "modules/remote_bitrate_estimator/include/bwe_defines.h"
 #include "rtc_base/bind.h"
 #include "rtc_base/checks.h"
diff --git a/modules/include/module_common_types.h b/modules/include/module_common_types.h
index 1c174a7..b03ca29 100644
--- a/modules/include/module_common_types.h
+++ b/modules/include/module_common_types.h
@@ -19,6 +19,7 @@
 
 #include "api/optional.h"
 #include "api/rtp_headers.h"
+#include "api/transport/network_types.h"
 #include "api/video/video_rotation.h"
 #include "common_types.h"  // NOLINT(build/include)
 #include "modules/include/module_common_types_public.h"
@@ -272,30 +273,6 @@
 
   virtual ~CallStatsObserver() {}
 };
-
-struct PacedPacketInfo {
-  PacedPacketInfo() {}
-  PacedPacketInfo(int probe_cluster_id,
-                  int probe_cluster_min_probes,
-                  int probe_cluster_min_bytes)
-      : probe_cluster_id(probe_cluster_id),
-        probe_cluster_min_probes(probe_cluster_min_probes),
-        probe_cluster_min_bytes(probe_cluster_min_bytes) {}
-
-  bool operator==(const PacedPacketInfo& rhs) const {
-    return send_bitrate_bps == rhs.send_bitrate_bps &&
-           probe_cluster_id == rhs.probe_cluster_id &&
-           probe_cluster_min_probes == rhs.probe_cluster_min_probes &&
-           probe_cluster_min_bytes == rhs.probe_cluster_min_bytes;
-  }
-
-  static constexpr int kNotAProbe = -1;
-  int send_bitrate_bps = -1;
-  int probe_cluster_id = kNotAProbe;
-  int probe_cluster_min_probes = -1;
-  int probe_cluster_min_bytes = -1;
-};
-
 }  // namespace webrtc
 
 #endif  // MODULES_INCLUDE_MODULE_COMMON_TYPES_H_