Fix no_global_constructors in congestion_controller/bbr.
Bug: webrtc:9693
Change-Id: I47eb1b27adb0fd40e7955e477fa31cdc462891cd
Reviewed-on: https://webrtc-review.googlesource.com/98581
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24608}
diff --git a/modules/congestion_controller/bbr/BUILD.gn b/modules/congestion_controller/bbr/BUILD.gn
index dac3c47..a424c11 100644
--- a/modules/congestion_controller/bbr/BUILD.gn
+++ b/modules/congestion_controller/bbr/BUILD.gn
@@ -23,7 +23,6 @@
rtc_source_set("bbr_controller") {
visibility = [ ":*" ]
- configs += [ "../../..:no_global_constructors" ]
sources = [
"bbr_network_controller.cc",
"bbr_network_controller.h",
diff --git a/modules/congestion_controller/bbr/bbr_network_controller.cc b/modules/congestion_controller/bbr/bbr_network_controller.cc
index 1b89c5d..618e90a 100644
--- a/modules/congestion_controller/bbr/bbr_network_controller.cc
+++ b/modules/congestion_controller/bbr/bbr_network_controller.cc
@@ -35,13 +35,13 @@
// minus the IP and UDP headers. IPv6 has a 40 byte header, UDP adds an
// additional 8 bytes. This is a total overhead of 48 bytes. Ethernet's
// max packet size is 1500 bytes, 1500 - 48 = 1452.
-const DataSize kMaxPacketSize = DataSize::bytes(1452);
+const DataSize kMaxPacketSize = DataSize::Bytes<1452>();
// Default maximum packet size used in the Linux TCP implementation.
// Used in QUIC for congestion window computations in bytes.
-const DataSize kDefaultTCPMSS = DataSize::bytes(1460);
+constexpr DataSize kDefaultTCPMSS = DataSize::Bytes<1460>();
// Constants based on TCP defaults.
-const DataSize kMaxSegmentSize = kDefaultTCPMSS;
+constexpr DataSize kMaxSegmentSize = kDefaultTCPMSS;
// The gain used for the slow start, equal to 2/ln(2).
const double kHighGain = 2.885f;