Commit graph

1805 commits

Author SHA1 Message Date
Florent Castelli
a6b9924988 Remove all usage of //rtc_base target
Bug: webrtc:9838
Change-Id: If813dbb426b4dc848185b64c0349d03fa9c059f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290986
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39116}
2023-01-16 14:36:06 +00:00
Evan Shrubsole
d8b6b06e70 [Unwrap] Delete rtc::TimestampWrapAroundHandler
Bug: webrtc:13982
Change-Id: Ia2999e952a55d97dbd69ff19cf12c8f712b1a62f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290882
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39087}
2023-01-12 14:21:03 +00:00
Evan Shrubsole
222c052864 [Unwrap] Delete SequenceNumbersConformanceTest
There is now only one sequence number unwrapper so this is redundant.

Bug: webrtc:13982
Change-Id: I210378e069366eb21dea0051f83d7431e4177057
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290892
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39085}
2023-01-12 13:39:37 +00:00
Evan Shrubsole
4387ad6cdc [Unwrap] Migrate dcsctp sequence numbers to SeqNumUnwrapper
Bug: webrtc:13982
Change-Id: Ic900a967d1b8e96a2b1ec99424674ccb33eb7165
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288940
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39084}
2023-01-12 12:00:30 +00:00
Florent Castelli
a5ba58662f Update visibility on rtc_base:log_sinks target
Some of the new targets are otherwise not visible by external users.

Bug: webrtc:9838
Change-Id: I7b92803692de64e0f93c9ec582c9fe615fda5e65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290844
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39068}
2023-01-11 11:54:09 +00:00
Florent Castelli
143c3b2b4c Update visibility on rtc_base:net_helper target
Some of the new targets are otherwise not visible by external users.

Bug: webrtc:9838
Change-Id: Idc585f45eeeb937802d5a898be57cf3d887fe142
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290730
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39059}
2023-01-10 15:21:34 +00:00
Florent Castelli
353a5ce7e3 Update visibility on rtc_base targets
Some of the new targets are otherwise not visible by external users.

Bug: webrtc:9838
Change-Id: Iba40401b689963615c1a7c528ae59bf66d26316b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290724
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39047}
2023-01-09 19:39:51 +00:00
Florent Castelli
372cf8b824 Prevent rtc_base:log_sinks from being defined in Chromium
This target belongs only to WebRTC and shouldn't be defined there.

Bug: webrtc:9838
Change-Id: Id44573ed4649170820a5a61b68d6077784da8549
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290722
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39041}
2023-01-09 18:23:16 +00:00
Florent Castelli
a138c6c8a5 Split rtc_base into multiple targets
Keeping the headers to allow compatibility with current users
that expect the headers to be in that target before they are
also updated.

Bug: webrtc:9838
Change-Id: I8b1e88850958e92c043686587a37791f01860220
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290569
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39031}
2023-01-09 12:21:25 +00:00
Evan Shrubsole
097fc347ec [Unwrap] Prepare SequenceNumberUnwrapper for migrations
This is in prep for the migration of all unwrappers to
SequenceNumberUnwrapper as a standard implementation.

This moves the SeqNumUnwapper to its own header and adds 2 methods to
SeqNumUnwrapper which are defined by other unwrappers:
* PeekUnwrap
* Reset

It also adds two implementations for RtpTimestamps and
RtpSequenceNumbers.

Bug: webrtc:13982
Change-Id: I5baefb2de1db92fe1bb600760bd63b71e9310eb5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288742
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39030}
2023-01-09 11:42:20 +00:00
Danil Chapovalov
c3c8934219 Use non recursive mutex in rtc::ThreadManager
ThreadManager, i.e. list of all thread is only used for debugging
purpose now, such uses do not enter the loop recursively

Bug: webrtc:11567
Change-Id: I7deb86e0245950c92fe27485285fd119baf6707a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/289461
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38986}
2023-01-03 13:28:50 +00:00
Rashad Sookram
a08d327650 Fix logging level 2023-01-02 17:17:14 -05:00
Danil Chapovalov
f4b21da965 Extend DivideRoundToNearest to support negative numbers and use for UnitBase
UnitBase own function to divide with rounding overflows when dividend is close to the max int64_t

Bug: b/262999013
Change-Id: I5b0c3f4408165a0f03690cab80bd098e506fc984
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288521
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38943}
2022-12-22 11:02:29 +00:00
Evan Shrubsole
6f5c314f07 Remove unused SeqNumUnwarpper::UnwrapForward/Backwards
Bug: webrtc:13982
Change-Id: I7cef4f9dd5f0c0dcb9680269005e4a9f04d3e490
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288741
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38939}
2022-12-21 12:07:06 +00:00
Markus Handell
82da9324bc Ensure task queues delete closures in task queue context.
Bug: webrtc:14449
Change-Id: I90d09d35398c1f8817701662f51cbc6a684a2fe0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275773
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38917}
2022-12-19 10:41:03 +00:00
Evan Shrubsole
aa5897dcc5 Add conformance tests for integer unwrapping.
This tests all of the known integer unwrappers in WebRTC
* rtc::TimestampWrapAroundHandler
* webrtc::Unwrapper<T>
* webrtc::SequenceNumberUnwrapper<T>
* dcsctp::UnwrappedSequenceNumber

The conformance tests show differences between in behavior between the
unwrappers.

This change also adds const accessors for the internal values of dcsctp::UnwrappedSequenceNumber.

Bug: webrtc:13982
Change-Id: Ia1b483d7ef5ceb43fa4d93013a76cd0251a58c22
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/287620
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38900}
2022-12-15 13:22:18 +00:00
Chunbo Hua
46ad25119c Make requested_resolution_alignment of webrtc::EncoderInfo as uint32_t.
At the same time, proper names of some parameters are refactored in SimulcastEncoderAdapter.

Bug: None
Change-Id: Ia036e3f362d1394e90aa26b79953c1ffe75e2fe0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284961
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Chunbo Hua <chunbo.hua@intel.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38870}
2022-12-12 06:02:59 +00:00
Byoungchan Lee
1b80be352b Fix unaligned memory access detected by UBSAN
Recently, Chromium added -fsanitize=alignment for `is_ubsan=true`,
and due to this, unaligned memory access was found in several places,
and chromium roll is currently blocked.
Modify unaligned memory access in rtc_base/byte_order.h to use memcpy.
Since libaom and libsrtp perform unaligned memory accesses, add them
to the suppression list.
Also, remove any mention of yasm from the UBSAN suppression list,
as yasm is no longer used.

Bug: chromium:1057551
Change-Id: I4961b66831750f4fa7b6de0b80b2052fe6ef27c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/286200
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38806}
2022-12-05 09:56:00 +00:00
Emil Lundmark
2d7a3e7ca8 Rename test helper for registering field trial keys
This new name emphasizes that the field trial keys are only allowed
within the current scope. We already have test::ScopedFieldTrials that
can be used to ensure that the global field trials string itself is
isolated.

Bug: webrtc:14705
Change-Id: I8b66bbd9c11d97985292c334d2d3496a047074a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284862
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38796}
2022-12-02 13:21:28 +00:00
Harald Alvestrand
cf7077693c Remove deprecated rtc::StreamInterface functions
This cleans up the last vestiges of the old interface for rtc::StreamInterface
and will cause builds to refer to the old functions to fail.

Bug: webrtc:14632
Change-Id: I569b16677754d7f9e08449e273672a59a86e6498
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283844
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38784}
2022-12-01 08:21:17 +00:00
Mirko Bonadei
d409621f28 Fix SetCurrentThreadName() for Fuchsia.
CL suggested by lingxueluo@.

Bug: b/236891952
Change-Id: I960d5b016186e9784e0af5e86608891a06e78b7e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284920
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38723}
2022-11-24 09:56:39 +00:00
Rashad Sookram
4344449a11 Fix compile-time error on Windows 2022-11-22 15:06:13 -05:00
Philipp Hancke
310e0624aa Add Cisco AnyConnect IPSec MAC to VPN detection
and set the underlying type to unknown for mac-based detection.

BUG=webrtc:13097,webrtc:13172
Co-authored by: amir.pirogovsky@microsoft.com

Change-Id: I177214f9eb5c2990faa65262f77b3d0ce9d5eab7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284500
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#38709}
2022-11-22 11:55:26 +00:00
Rashad Sookram
4deb88c596 Clean up diff 2022-11-18 15:39:11 -05:00
Diep Bui
3d9b5590c2 Move field trial from BasicNetworkManager to NetworkManagerBase
Bug: webrtc:14306
Change-Id: I9bba38090a77a40f599eaa680da3cf60810b0337
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283801
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38674}
2022-11-18 10:39:04 +00:00
Rashad Sookram
5c49cd217c Fix post-merge errors 2022-11-16 17:17:11 -05:00
Mirko Bonadei
99543ae75f Revert "Remove backwards compatibility functions in openssl"
This reverts commit 4db5b979b7.

Reason for revert: Breaks downstream project

Original change's description:
> Remove backwards compatibility functions in openssl
>
> After changing base functions to a CHECK instead of an =0, these
> are no longer needed.
>
> Bug: webrtc:14632
> Change-Id: If3f1a62905cf433486f4974b2153c9210d1e045b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283542
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38643}

Bug: webrtc:14632
Change-Id: I4c0ec753285fab882f60b059b3d34f772bf5f7e7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283721
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38649}
2022-11-16 14:24:11 +00:00
Harald Alvestrand
4db5b979b7 Remove backwards compatibility functions in openssl
After changing base functions to a CHECK instead of an =0, these
are no longer needed.

Bug: webrtc:14632
Change-Id: If3f1a62905cf433486f4974b2153c9210d1e045b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283542
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38643}
2022-11-16 10:09:33 +00:00
Harald Alvestrand
7ccd88f3e5 Convert SocketStream to use new StreamInterface API
Bug: webrtc:14632
Change-Id: I09a6799a9b70f073dde5b7074e4431570c8c9c67
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283543
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38641}
2022-11-16 09:55:47 +00:00
Harald Alvestrand
3e0658beec Convert FifoBuffer to new StreamInterface API
Bug: webrtc:14632
Change-Id: Id6d17d0402c5e3a0e24258c7afa38ca34e7ab227
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283541
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38640}
2022-11-16 09:53:16 +00:00
Harald Alvestrand
dd4c4068d9 Convert MemoryStream to use new StreamInterface
Bug: webrtc:14632
Change-Id: Id6a7e011a6102e829a14de246d07a9aab1e6934f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283620
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38639}
2022-11-16 09:51:42 +00:00
Rashad Sookram
2e9c66e1b1 Finish resolving merge conflicts 2022-11-11 19:10:59 -05:00
Rashad Sookram
bd151651d3 Merge in M108 2022-11-11 17:02:35 -05:00
Harald Alvestrand
11840ce684 Deprecate void* forms of StreamInterface::Read and ::Write
Updates the code to use the new interfaces

Bug: webrtc:14632
Change-Id: I33b2a25b5968de0251e3cbc84076afc013ecef6e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282680
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38601}
2022-11-10 12:40:20 +00:00
Per Kjellander
0dbee62eb9 Remove unused RateControlSettings::TriggerProbeOnMaxAllocatedBitrateChange
The flag has been default true for a long period of time.(longer than https://webrtc-review.googlesource.com/c/src/+/148581)
Reference to it was removed in https://webrtc-review.googlesource.com/c/src/+/282860

Bug: webrtc:14392
Change-Id: I08aab062acc27d39b41c9d96571ed2ce058f2eec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282862
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38599}
2022-11-10 09:12:08 +00:00
Per Kjellander
3daf696188 Add offset to timestamp from socket
This is to ensure Epoch is the same if transport switch to TCP or another transport.
First packet received will always be timestamped with rtc::TimeMicros.
Other packet timstamps will use the kernel timestamp as an offset from the first packet timestamp.
For BWE, it is important that there is not a large time base diff if transport change.

This change is protected by the experiment WebRTC-SCM-Timestamp.

Bug: webrtc:14066
Change-Id: Iaeb49831e7019e21601bc90895ac56003a54e206
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281000
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38587}
2022-11-09 11:16:33 +00:00
Per Kjellander
fdcfefa708 Add experiment to use ::recvmsg to receive packets on posix systems
Using ::recvmsg ensure packet timestamp can then be read directly when reading the buffer
instead of a separate system call and should also work on Ios/Mac.

The same experiment field trial flag will be "WebRTC-SCM-Timestamp/enabled/" and is also planned to be used for fixing webrtc:14066

Bug: webrtc:5773, webrtc:14066
Change-Id: I8a3749e87c686aa18fcee947472c1b602a0f63c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279280
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38585}
2022-11-08 12:51:49 +00:00
Harald Alvestrand
1f609c8582 Add aliases for StreamInterface::Read/Write using ArrayView
A few usages in ssl_stream_adapter_unittests are converted to make
sure the aliases are usable.

Next steps are:
- Change all usages inside WebRTC to the new form
- Deprecate the old API
- Remove the old API

Pipewire failures believed to be unrelated, so No-try.

No-try: true
Bug: webrtc:14632
Change-Id: I618551e61a05d53e524e97483d3c7cef59b88a25
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282221
Reviewed-by: Tomas Gunnarsson <tommi@google.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38577}
2022-11-08 09:16:05 +00:00
Danil Chapovalov
f6e48bf4d1 Add IWYU pragmas for some api headers
Bug: None
Change-Id: I1912e05dbc31d960f36c97151dcb387446535c71
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280965
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38510}
2022-10-31 15:43:16 +00:00
Björn Terelius
4fdf8cc67b Suppress -Wdeprecated-volatile in rtc_base/system_time.cc
Bug: webrtc:14601
Change-Id: Ifb6e0cb372231920108142b5efc076039943581b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280442
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38471}
2022-10-25 17:38:01 +00:00
Joachim Reiersen
e457e43836 Fix bug where RTCTransportStats.dtlsCipher was missing when using OpenSSL
A bug in the id being searched for inside OpenSSLStreamAdapter::SslCipherSuiteToName prevented the lookup from ever succeeding.

This resulted in this stat being unavailable when calling PeerConnection::GetStats(). To fix the problem, look for (0x03000000L | cipher_suite) which matches what the BoringSSL codepath is doing.

Bug: webrtc:14596
Change-Id: Ic36d77dbc4c2378fbde1e2f21a9f5bd735b36741
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280100
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38460}
2022-10-24 20:51:33 +00:00
Tommi
2fc37573b9 Add DISALLOW_WAIT(), a regression catching utility.
Bug: none
Change-Id: I94def80a7eb815f74d1be691d21b5f3661771a71
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279821
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38457}
2022-10-24 11:10:26 +00:00
Emil Lundmark
6bf20cc76a Verify field trials looked up through field_trial::FindFullName
For now, the run-time check will only be enabled if the
rtc_strict_field_trials GN arg is set.

In order to allow testing with imaginary field trial keys, two test
helpers have been added. It's a bit awkward to test these since the
field trial string is already global, hence the helpers are also
modifying global state. Tests must make sure this global state is reset
between runs. Things won't be an issue anymore when [1] has removed the
global string.

[1] https://crbug.com/webrtc/10335

Bug: webrtc:14154
Change-Id: Ida44cc817079d7177325e2228cf1f1d242b799e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276269
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38447}
2022-10-20 10:46:01 +00:00
Mirko Bonadei
5c9b7da038 Add missing dependencies.
Bug: b/251890128
Change-Id: Ia9312797a5552ad1ceb4a80968014b849121a1b9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278580
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38333}
2022-10-10 10:18:37 +00:00
Mirko Bonadei
9d9c2d5795 Make header files self contained.
This CL adds #includes to header files in order to make them
self contained after the preprocessor pass.

Bug: b/251890128
Change-Id: I81c3ba38fb8ab8a2bbd151ba99aa871fae9f1b1b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278422
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38327}
2022-10-08 08:38:36 +00:00
Jonas Oreland
3c775ece73 Rewrite "Reset all maps in AndroidNetworkMonitor Start()/Stop()"
This reverts commit 8cd7b0a7ba.

The assumption in AndroidNetworkMonitor that an interface name
is unique has turned out to be incorrect :( for some (weird) devices,
i.e ccmni0.
It is unclear if it is a permanent setup or a transient state.

This cl/ changes the impl. to cope with that, the last
OnNetworkConnected_n "owns" the interface name, and when
OnNetworkDisconnected_n runs, we check if we're "owner"
and maybe set a new "owner" (if we're not "owner" we do nothing).

New testcases added.

I also
1) change NetworkMonitorInterface to return a struct
with all the information that is requested with interface name
as key.
2) Change Network.cc adding (debug) assertions that network
properties can't change inside a loop (in one thread).

Original change's description:
> Revert "Reset all maps in AndroidNetworkMonitor Start()/Stop()"
>
> This reverts commit 02293096f9.
>
> Reason for revert: mysterious crashes in android_network_monitor.cc
>
> Original change's description:
> > Reset all maps in AndroidNetworkMonitor Start()/Stop()
> >
> > This cl/ fixes another race condition with the recent additions
> > to NetworkMonitorAutoDetect (getAllNetworksFromCache).
> >
> > The getAllNetworksFromCache-feature uses the by the Android team
> > preferred way of enumerating networks, i.e to register network listeners.
> >
> > Th recent fix to add IsAdapterAvailable, https://webrtc-review.googlesource.com/c/src/+/257400
> > contained a bug in that the adapter_type_by_name_ map was not
> > reset either on disconnect or Start/Stop.
> >
> > This cl/ addresses that including unit test.
> > It also de-obfuscates NetworkMonitor so that it always
> > calls NotifyOfActiveNetworkList on startMonitoring even
> > if list.size() == 0. This should not matter but makes
> > code easier to understand.
> >
> > Bug: webrtc:13741
> > Change-Id: I438b877eebf769a8b2e7292b697ef1c0a349b24f
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258721
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#36530}
>
> Bug: webrtc:13741
> Change-Id: I36fbf63f658d3e8048e13959cbebfbd14df12b14
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264146
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37016}

Bug: webrtc:13741
Change-Id: Ib4eb072b775e493b564528f0be94c685b70ec20f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264421
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37056}
2022-10-04 15:25:49 -07:00
Mirko Bonadei
0e3151e181 Fix comparator bugs which are not compliant to strict weak ordering.
See a full explanation of the problem on this blog [1] post about changing
std::sort in LLVM and relative issues uncovered.

The CompareNetwork function was violating the 4th rule of "strict weak
ordering" (Transitivity of incomparability: x == y and y == z imply x == z, where x == y means x < y and y < x are both false).

[1] - https://danlark.org/2022/04/20/changing-stdsort-at-googles-scale-and-beyond/

Bug: None
Change-Id: I7e893f0a30da31403766284823f75c45c4db91c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251681
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36711}
2022-10-04 15:25:49 -07:00
Niels Möller
270d3b5181 Reland "Delete deprecated versions of MergeNetworkList"
This is a reland of commit 7679e9bf07

Breakage in chrome/services/sharing/ (not built as part of webrtc
presubmit) should be fixed with
https://chromium-review.googlesource.com/c/chromium/src/+/3604642

Original change's description:
> Delete deprecated versions of MergeNetworkList
>
> Bug: webrtc:13869
> Change-Id: I6b888ba14ca664a1f28de2fb59b7d1343cb18bd8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259300
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36611}

Bug: webrtc:13869
Change-Id: I4cf0fe0f2310eabb2d0b32c6dec5f8aef64c7712
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259869
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36704}
2022-10-04 15:25:49 -07:00
Ilya Nikolaevskiy
e4577d9f57 Revert "Delete deprecated versions of MergeNetworkList"
This reverts commit 7679e9bf07.

Reason for revert: Breaks chromium roll (see https://ci.chromium.org/ui/p/chromium/builders/try/linux-chromeos-compile-dbg/998457/overview)

Original change's description:
> Delete deprecated versions of MergeNetworkList
>
> Bug: webrtc:13869
> Change-Id: I6b888ba14ca664a1f28de2fb59b7d1343cb18bd8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259300
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36611}

Bug: webrtc:13869
Change-Id: I781ac1980687367ee17d033f6613c2e487b7966f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259775
Auto-Submit: Ilya Nikolaevskiy <ilnik@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36621}
2022-10-04 15:25:49 -07:00
Niels Möller
3b256bf720 Delete deprecated versions of MergeNetworkList
Bug: webrtc:13869
Change-Id: I6b888ba14ca664a1f28de2fb59b7d1343cb18bd8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259300
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36611}
2022-10-04 15:25:49 -07:00
Niels Möller
ed76b74931 Use std:unique_ptr for Network objects owned by the NetworkManager.
Bug: webrtc:13869, webrtc:13846
Change-Id: I699ac4774f84cf891304b9c75434301f99ca55d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258500
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36569}
2022-10-04 15:25:49 -07:00
Per Kjellander
4d41913d14 Implement RTC_LOG_IF and RTC_DLOG_IF
and
RTC_LOG_IF_F and RTC_DLOG_IF_F


Bug: webrtc:14505
Change-Id: I5df1e920831f545752f6d7433f0ae853e58c0b9f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277441
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38258}
2022-09-30 12:01:28 +00:00
Jonas Oreland
6c2dae21e9 Move VideoEncoderConfig from api/ into video/config
This cl move VideoEncoderConfig from api/ to video/config.

VideoStreamEncoderInterface and VideoStreamEncoderObserver
are moved as collateral.

brandt@ think that the reason these were in api/ in the
first place had to downstream project.

Functionality wise, this is a NOP, but it makes it easier
to modify the encoder (config).

Bug: webrtc:14451
Change-Id: I2610d815aeb186298498e7102cac773ecac8cd36
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277002
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38242}
2022-09-29 09:44:43 +00:00
Byoungchan Lee
4086721e6a Make ExpectationToString generate detailed logs in more cases.
ExpectationToString is used to explain why RTC_DCHECK_RUN_ON is
triggered.
Unfortunately, the current implementation only generates verbose strings
when SequenceCheckerImpl is passed as an argument.

Modify ExpectationToString to generate detailed messages even for
derived classes of SequenceCheckerImpl.

Bug: None
Change-Id: I55f76d44ad59dbe6f21cee7d7d8e19188e0f3088
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276061
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38211}
2022-09-26 16:24:04 +00:00
Henrik Boström
69d23c9386 Add RTCCertificateStats cache to avoid rtc::SSLCertChain::GetStats.
Unlike the cache of the entire stats report which is time limited, this
certificate cache is valid for an unlimited amount of time, but is
cleared at ClearCachedStatsReport() which is already called on each
SLD/SRD call. Since certificates can only change by negotiation, this
cache is ensured to always be invalidated when certificates change.

Since ClearCachedStatsReport() can happen for other reasons than
certificates changing we may clear the cache more often then is
necessary, but arguably this is seldom enough that we don't have to
create a separate "ClearCertificateStats()" method. Keep it simple?

The cache specifically avoids rtc::SSLCertChain::GetStats which
trigger rtc::SSLCertificate::GetStats and rtc::Base64::EncodeFromArray.

Bug: webrtc:14458
Change-Id: I5f95a4a5eb51cc4462147270fdae7bb9fb7bc822
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276602
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38205}
2022-09-26 13:55:40 +00:00
Danil Chapovalov
d1875a232c Delete rtc::Location
Bug: webrtc:11318
Change-Id: I0b048a93c53fd40f398b82df4c1a500e0f05cb38
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276280
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38196}
2022-09-26 10:16:21 +00:00
Danil Chapovalov
3ab76d945c Use non-recursive mutex in rtc::Thread
With rtc::Thread::Clear removed, there are no longer calls to external code while holding the mutex and thus it doesn't need to be recursive.

Bug: webrtc:11567
Change-Id: If350684be0bfcbc33806019bd986138905aec66d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276542
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38179}
2022-09-23 11:59:57 +00:00
Danil Chapovalov
cbad8add12 Delete rtc::Message and rtc::MessageHandler
Bug: webrtc:9702
Change-Id: I5b9a42264b2a84acce9096b21102233b4ed2f5ce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276261
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38160}
2022-09-21 15:15:30 +00:00
Danil Chapovalov
d44e3410b6 Delete rtc::Thread functions that use rtc::MessageHandler
Bug: webrtc:9702
Change-Id: I6fc8aa8a793caf19d62a149db1861c352c609255
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275774
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38150}
2022-09-21 11:33:47 +00:00
Artem Titov
b555e83395 add ccmni as cellular type
"ccmni" is the cellular interface name in MTK platform.
The accurate name may be ccmni0, ccmni1 ...etc. We would like
to add it in order to provide correct adapter type when user
invokes webrtc function GetAdapterTypeFromName.

Bug: b/246680543, webrtc:14438
Change-Id: I30074a442b3c02b93bc72a044675718955bd96f4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275860
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38113}
2022-09-19 07:53:18 +00:00
Danil Chapovalov
babdaa8623 Unbind VirtualSocket from rtc::MessageHandler
Instead protect pending tasks with a shared object.
Some tests destroy VirtualSocket on a different thread than it is used on,
Some tests destroy VirtualSocket together with VirtualSocketServer after
associated thread is deleted, thus complicated check is used to ensure
VirtualSockets are safe to use.

Bug: webrtc:9702
Change-Id: I1a19cd24ac6a598a1cde64434104cad0b750096e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274460
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38103}
2022-09-16 14:13:41 +00:00
Danil Chapovalov
e16e3e2cb8 Delete MessageHandlerAutoCleanup and ThreadManager::Clear
Bug: webrtc:11988
Change-Id: Ic54d37fb802c9e55d417d65aa735fb07097d1b71
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275768
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38102}
2022-09-16 14:12:38 +00:00
Rasmus Brandt
bcf24f5bcd Move TimestampExtrapolator closer to its single user
The `TimestampExtrapolator` is only used by the `VCMTiming`
class, despite there being references to it from both
`modules/rtp_rtcp/BUILD.gn` and `modules/video_coding/BUILD.gn`.

Bug: webrtc:14111
Change-Id: If1a02a56a0c83b13d619ca08dc76c884fa829369
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275482
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38093}
2022-09-15 13:49:18 +00:00
Rasmus Brandt
916648107b Generalize MovingMedianFilter to MovingPercentileFilter
* Make `percentile` configurable and rename class.
* Introduce convenience type `MovingMedianFilter` that
  maintains the behaviour of the old class with that name.
* Move home grown moving 95th percentile filter in
  `JitterEstimator` to this new utility class.

Bug: webrtc:14151
Change-Id: I17d525b6e0bc98c28568c7dfe94b72eeab4a1ca2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275311
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38082}
2022-09-14 15:32:06 +00:00
Byoungchan Lee
8c725f368c Fix several UBsan issues with memcpy
Most of the changes are trivial.

Bug: webrtc:14432
Change-Id: I0444527bf57c72c8d65f69754b4a4a1c1d7b2e92
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275340
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38074}
2022-09-14 09:35:39 +00:00
Danil Chapovalov
ca1454a9c2 Delete rtc::Thread::Send in favor of rtc::Thread::BlockingCall
Bug: webrtc:9702
Change-Id: Ie425c99e8d05ad84801b527207732e4d45494dbd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275242
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38071}
2022-09-13 16:05:40 +00:00
Wang Qing
842858c6d0 loongarch: Add loongarch architecture support.
Copied from chromium's build/build_config.h

No-Try: True
Bug: webrtc:14433
Change-Id: I5ab4dbb49bd74aa8f6f6054776d9f1f3d606d914
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275288
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@google.com>
Cr-Commit-Position: refs/heads/main@{#38067}
2022-09-13 10:44:59 +00:00
Danil Chapovalov
9e09a1f327 Replace Thread::Invoke with Thread::BlockingCall
BlockingCall doesn't take rtc::Location parameter and thus most of the dependencies on location can be removed

Bug: webrtc:11318
Change-Id: I91a17e342dd9a9e3e2c8f7fbe267474c98a8d0e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274620
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38045}
2022-09-09 10:44:17 +00:00
Danil Chapovalov
7c323ad47c in rtc::Thread introduce Invoke without rtc::Location parameter
To reduce usage of rtc::MessageHandler, hide rtc::Thread::Send into private section with intention to deprecate it in favor of the new Invoke function.

Bug: webrtc:9702, webrtc:11318
Change-Id: Ib4c26f9abc361e05a45b2a91929af58ab160b3f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274166
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38036}
2022-09-08 15:00:40 +00:00
Danil Chapovalov
1e6965a857 Remove usage of MessageHandlerAutoCleanup in rtc_base unittests
Bug: webrtc:11988
Change-Id: I95017df0cd188897a0507bb07e7e571343f80262
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274161
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38008}
2022-09-05 10:14:50 +00:00
Danil Chapovalov
6f8b4cd40d In FakeNetworkManager remove MessageHandlerAutoCleanup dependency.
Post task in a less safer way assuming test won't try to destroy the manager right after starting the updates.

Bug: webrtc:11988
Change-Id: Idf5d001b9c09d8df793112e4ad95690f9660ac3a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273961
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38007}
2022-09-05 09:24:00 +00:00
Danil Chapovalov
f136165c54 In virtual socket unittests replace MessageHandler with RepeatingTask
MessageHandlerAutoCleanup class is marked for removal

Bug: webrtc:11988
Change-Id: I44646b53e5a9520eb1d6c314b7bd580b1bdc0078
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273940
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37997}
2022-09-02 14:36:58 +00:00
Danil Chapovalov
16242931e3 Delete DEPRECATED_AsyncInvoke
Bug: webrtc:12339
Change-Id: I5de095da811e117f7d3db499a3c9da5c29c08f4f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273880
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37996}
2022-09-02 14:02:34 +00:00
Diep Bui
a5d80a7646 Add PreferGlobalIPv6Address param to IPv6NetworkResolutionFixes field trial string.
Bug: webrtc:14334
Change-Id: Iedbc18d2ebd77b4fedd4e7936a5aa4da35279328
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273101
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Sameer Vijaykar <samvi@google.com>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37991}
2022-09-02 10:39:58 +00:00
Sameer Vijaykar
f4c0162310 Cleanup: Make AsyncResolveInterface::Start(addr,family) pure virtual
Dependencies have been updated now.

Bug: webrtc:14319, webrtc:14131
Change-Id: I03397f6dfa17cbb2faa85346c5ea37847f1e2482
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271344
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Cr-Commit-Position: refs/heads/main@{#37944}
2022-08-30 10:09:32 +00:00
Ali Tofigh
4b6819434d Reland "Add TaskQueueStdlib experiment."
This is a reland of commit 83db78e854

Original change's description:
> Add TaskQueueStdlib experiment.
>
> Bug: webrtc:14389
> Change-Id: I23c6e0ae675748ec35a99c334104dd2654995a33
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265802
> Commit-Queue: Ali Tofigh <alito@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37888}

Bug: webrtc:14389
Change-Id: If84c7043e5f0f63ae8d9eae651daf900a72f2ee3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273320
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37923}
2022-08-29 10:48:42 +00:00
Danil Chapovalov
71cf2d0eb1 Delete rtc::Thread::Dispose as unused
Bug: webrtc:8324
Change-Id: I18ed725bd95f133f4c43f1268eb37179053557da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273104
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37918}
2022-08-26 14:44:09 +00:00
Markus Handell
9a21c49337 SocketServer: Migrate Wait/kForever to TimeDelta.
Bug: webrtc:13756
Change-Id: Ie36ca38b1ab336742231b101ef7bb5ccf3735659
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272102
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37903}
2022-08-25 13:01:34 +00:00
Ali Tofigh
e7e3d5925a Revert "Add TaskQueueStdlib experiment."
This reverts commit 83db78e854.

Reason for revert: Some tests in Chromium's blink no longer compile because of the change in the signature of the CreateDefaultTaskQueueFactory() function.

Original change's description:
> Add TaskQueueStdlib experiment.
>
> Bug: webrtc:14389
> Change-Id: I23c6e0ae675748ec35a99c334104dd2654995a33
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265802
> Commit-Queue: Ali Tofigh <alito@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37888}

Bug: webrtc:14389
Change-Id: If3e63d6b4ab9e838dc5020b88076a73fd29916e4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272920
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37902}
2022-08-25 12:41:05 +00:00
Danil Chapovalov
0bd166530d in rtc::Thread remove special handling of the Dispose message
rtc::Thread::Dispose is only used in test code,
but complicates the main thread loop.

Bug: webrtc:8324
Change-Id: I2dccdadcdc932b9992958d1e70fb93d1879b7618
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272821
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37894}
2022-08-24 18:58:17 +00:00
Rashad Sookram
9ed4194e49
Update to 5005 (M102) (#86) 2022-08-24 11:07:33 -04:00
Danil Chapovalov
207f8536b2 In rtc::Thread hide MessageHandler handling as implementation details
Remote Peek function as unused
Move Get and Dispatch into private section to ensure they are not used
from outside.

Bug: webrtc:9702
Change-Id: Ibd0b236fe43543d60f97f988524526493bbeaaa7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272804
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37889}
2022-08-24 13:40:09 +00:00
Ali Tofigh
83db78e854 Add TaskQueueStdlib experiment.
Bug: webrtc:14389
Change-Id: I23c6e0ae675748ec35a99c334104dd2654995a33
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265802
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37888}
2022-08-24 11:28:39 +00:00
Danil Chapovalov
b7da81621c Replace RTCCertificateGeneratorCallback interface with an AnyInvocable
follow up of the https://webrtc-review.googlesource.com/c/src/+/272402

Bug: None
Change-Id: Ie47aff9fccdb4037c1f560801c780dd549b373ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272553
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37870}
2022-08-22 16:53:14 +00:00
Markus Handell
0cd0dd3b07 rtc::Event: Finalize migration to TimeDelta.
Bug: webrtc:14366
Change-Id: Icd8792a2f9efa5609dd13da2e175042fac101d36
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272101
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Auto-Submit: Markus Handell <handellm@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37844}
2022-08-19 13:44:57 +00:00
Markus Handell
2cfc1af78a Update rtc::Event::Wait call sites to use TimeDelta.
Bug: webrtc:14366
Change-Id: I949c1d26f030696b18153afef977633c9a5bd4cf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272003
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37835}
2022-08-19 10:07:28 +00:00
Markus Handell
1d5be49ff2 rtc::Event: Add TimeDelta support.
This CL adds TimeDelta support to the rtc::Event, and updates
the Wait implementations to work with the improved precision.

Bug: webrtc:14366
Change-Id: Iefeb638b18176a34f4ed2a5131754a7b7e6c9e99
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272002
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37831}
2022-08-19 07:11:06 +00:00
Danil Chapovalov
e7280c314d Remove usage of rtc::MessageHandler in OpenSSLAdapter
Bug: webrtc:11988
Change-Id: I4ced39190630139fe31d449ac23385885432931d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272181
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37824}
2022-08-18 12:40:46 +00:00
Mirko Bonadei
7103e7085f Prevent UB on BufferT::AppendData and ctor.
While [1] partially fixed the problem, UB was still possible when
AppendData was called with size=0 or in one of the constructors.

[1] - https://webrtc-review.googlesource.com/c/src/+/271502

Bug: webrtc:14292
Change-Id: I9196e23687ee82b7bfbe1ed43460d9f99adcd1ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271980
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37814}
2022-08-18 08:53:06 +00:00
Markus Handell
6df49b9d01 TaskQueueStdlib: remove dependency on Event::kForever being int.
While transitioning to TimeDelta, WebRTC and Chromium has a
different idea about what type rtc::Event::kForever is. Code
can't assume rtc::Event::kForever is the same type as timed
wait arguments.

Bug: webrtc:14366
Change-Id: I4783c7de6d567c70b211de9aa9889417f6fafba1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272060
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37810}
2022-08-17 14:09:23 +00:00
Markus Handell
211ecb445f Prepare rtc::Event to take on webrtc::TimeDelta dependency.
Bug: webrtc:14366
Change-Id: I7a07828599bafd974019e31b40788e70ca14b025
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271297
Auto-Submit: Markus Handell <handellm@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37801}
2022-08-16 14:19:14 +00:00
Mirko Bonadei
48ac38ec9b Prevent UB on BufferT::AppendData.
As per https://en.cppreference.com/w/cpp/string/byte/memcpy, calling
std::memcpy with dest or src as nullptr is UB.

This CL prevents this from happening and is also looking into
why UBSan didn't catch the issue.

Bug: webrtc:14292
Change-Id: I99833f28ac865719d0dcb02c4de00f33a48c3992
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271502
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37783}
2022-08-15 10:11:46 +00:00
Danil Chapovalov
2aaef45876 Replace Invoke in tests with SendTask test helper
Bug: webrtc:11318
Change-Id: I14e3fbc694d41c785a61c88d8207005c681576c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271540
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37774}
2022-08-12 23:42:16 +00:00
Mirko Bonadei
57574ea577 Fix potentially negative Timestamp in logs.
This bug was activated by [1] when we started to store the timestamp
in the webrtc::Timestamp class (causing an RTC_DCHECK to trigger) but
it has been in the codebase for long time (but without using
webrtc::Timestamp the RTC_DCHECK was not triggered).

Basically, LogStartTime() can be called externally to create a baseline
for logging but if that is not the case, LogMessage should call it [2]
and initialise the baseline.

This was happening in reverse order, causing the first LogMessage to
call LogStartTime() after the SystemTimeMillis(), causing a negative
time difference that when gets wrapped into webrtc::Timestamp triggers
the RTC_DCHECK [3].


[1] - https://webrtc-review.googlesource.com/c/src/+/269249
[2] - https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/rtc_base/logging.h;l=493-497;drc=821b92a66ed661714cc21020b5a045fcd18d0176
[3] - https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/rtc_base/units/unit_base.h;l=122;drc=6dcd43f1e4f2f3ec0bd844cd45e011e9c4d16e38

Bug: b/238157120
Change-Id: I891799316503030c0df5e10e759a61dfc5e1ab3c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271582
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37770}
2022-08-12 19:54:33 +00:00
Sameer Vijaykar
71434ae614 Rename PreferGlobalIPv6ToLinkLocal field trial to group IPv6 fixes.
This combines the below IPv6 fixes into the field trial
WebRTC-IPv6NetworkResolutionFixes:
1. Prefer global IPv6 address over link local
2. Use address family when resolving STUN hostname

WebRTC-PreferGlobalIPv6ToLinkLocal is currently in Dev but will be
rolled back temporarily.

Bug: webrtc:14334, webrtc:14131
Change-Id: I1fb3f55c4c5f3c5c0b441ece30e72cf393e074d0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271340
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37754}
2022-08-11 16:24:12 +00:00
Sameer Vijaykar
a75eb43e99 Lookup STUN hostname using the network's IP family.
The current behaviour is to lookup using AF_UNSPEC, which leaves
the decision up to the getaddrinfo implementation, then filter to
resolved addresses matching the network family anyway.

Looking up using the network's family upfront avoids resolving to
an unusable address.

Bug: webrtc:14319, webrtc:14131
Change-Id: I4997452dc26aeb82e5d2890701721e7d477803a8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270625
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37753}
2022-08-11 15:34:32 +00:00
Sameer Vijaykar
b787e26369 Support DNS resolution matching a specified IP family.
The input SocketAddress for STUN host lookup is constructed with just
the hostname, so the family is AF_UNSPEC. So added an overload with a
target family to distinguish this from the family of the input addr.

Bug: webrtc:14319, webrtc:14131
Change-Id: Ia5ac5aa2e894e0c4dfb4417e3e8a76a6cec3ea71
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270624
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@google.com>
Cr-Commit-Position: refs/heads/main@{#37750}
2022-08-11 13:52:53 +00:00
Danil Chapovalov
e519f38eaa Remove rtc::Location from SendTask test helper
that rtc::Location parameter was used only as extra information for the
RTC_CHECKs directly in the function, thus call stack of the crash should
provide all the information about the caller.

Bug: webrtc:11318
Change-Id: Iec6dd2c5de547f3e1601647a614be7ce57a55734
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270920
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37748}
2022-08-11 12:55:32 +00:00
Danil Chapovalov
c0ce454868 Delete QueuedTask and ToQueuedTask as no longer needed
Bug: webrtc:14245
Change-Id: I4b36c8d6f0709202e01d22386644c20cad58450f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269403
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37718}
2022-08-09 11:11:26 +00:00
Danil Chapovalov
9ee752aefb Replace as_const/void_t/no_fn type traits with their c++17 variants
webrtc own implementaions are no longer needed since webrtc uses c++17

Bug: None
Change-Id: I38bb295334182b73d333a453001d256e6df172d9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270924
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37716}
2022-08-09 07:53:36 +00:00
Mirko Bonadei
821b92a66e Fix LogLineRef for when logging is disabled.
No-Try: True
Bug: b/238157120
Change-Id: Id8dd096884ba5808c78ea93f1886ca259d4573ab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270484
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37683}
2022-08-03 15:16:54 +00:00
Mirko Bonadei
73f0c21640 Fix const correctness.
Bug: b/238157120
Change-Id: I2887b5be48d841c9ff915d669fb623b77f1e21d1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270481
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37679}
2022-08-03 13:53:14 +00:00
Danil Chapovalov
07eaddf939 Inline assert in RTC_DCHECK_RUN_ON macro
clangd ignores ASSERT_EXCLUSIVE_LOCK macro attached to an inline function in header, thus IDEs relying on clangd issue false positive warnings about members acceesses without the check of the current sequence.
Attaching assert attribute to an inlined lambda function seems to solve that issue

Bug: None
Change-Id: I6199fee26061aa4223f2e3ea7b7b14bb5820c0bc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270480
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37678}
2022-08-03 13:28:28 +00:00
Mirko Bonadei
70ed471836 Test logging also with Windows paths.
Bug: None
Change-Id: Ic5d52b90d3a3f245bd9d2f56cda85b0cc1a1ef8d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270460
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37677}
2022-08-03 13:23:46 +00:00
Mirko Bonadei
96191f8e68 Fine grain LogSink APIs.
The goal of this CL is to create a new LogSink::OnLogMessage API which
propagates the source location of the log to the log sinks.

Bug: b/238157120
Change-Id: I5a12bf80fd9c5569ed7aa1ef9185eee58830b19f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269249
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37672}
2022-08-03 10:01:20 +00:00
Philipp Hancke
a204ad210d clean up misc TimeDelta use
follow-up from https://webrtc-review.googlesource.com/c/src/+/262810

* replace Time::Millis(0) and TimeDelta::Millis(0) with ::Zero()
* drop unnecessary webrtc namespace from some TimeDeltas
* make TimeDelta do the unit conversion for stats

BUG=webrtc:13756

Change-Id: Ic60625ae0fc7959a47a6be9f5051851feaf76373
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265875
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37664}
2022-08-02 13:52:36 +00:00
Fredrik Solenberg
ca85194e40 Remove unused sigslot::repeater
Bug: webrtc:11943
Change-Id: I7a98038983edd8a14e741b204fc0e3a64741b3ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270380
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37659}
2022-08-02 10:17:38 +00:00
Diep Bui
1e589eb77f Modify GetBestIP to prefer global IPv6 addresses to the link local IPv6 addresses.
The change is behind the flag WebRTC-PreferGlobalIPv6ToLinkLocal.

Bug: webrtc:14306
Change-Id: Id2cae2e510fcfd007016e79ae4bd46947101d0fc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269762
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37658}
2022-08-02 10:16:35 +00:00
Peter Boström
d6e861da8b Use WriteFatalLog with overrides under Chromium
This replaces the former WriteFatalLogAndAbort function with the two new
WriteFatalLog functions that're already submitted as overrides in
Chromium.

The default implementations of these are not defined under
WEBRTC_CHROMIUM_BUILD.

Bug: chromium:1216177
Change-Id: I207e1f96f14094d742a51849f4fa6b4f1022333e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269780
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Peter Boström <pbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37652}
2022-08-01 18:04:04 +00:00
Peter Boström
e1c893530d Add WriteFatalLog declarations to checks.h header
This adds a file,line version of this function (not yet committed) as
Chromium logging uses LogMessage(file, line, severity) and needs this
information to give better logs.

The two versions of this method will be implemented in webrtc_overrides/
and then committed to Chromium. At this point checks.cc will move its
anonymous-namespace version of this function (and be renamed) to
match this definition, but only define it when not building with
Chromium.

At this point WriteFatalLog will be using LogMessage(LOG_FATAL) to crash
in Chromium allowing us to upload better crash dumps and stacks to crash
reporting.

Bug: chromium:1216177
Change-Id: I3fd6a84cdfbb2552a5e628d46257bd7a00c9e6dc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269288
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Peter Boström <pbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37646}
2022-07-29 19:41:51 +00:00
Erik Språng
0c1a934e26 Remove unused video/screenshare hysteresis trials.
This removes the unused field trials
`WebRTC-SimulcastScreenshareUpswitchHysteresisPercent` and
`WebRTC-SimulcastScreenshareUpswitchHysteresisPercent` as well as the
`video_hysteresis` and `screenshare_hysteresis` parameters in
`WebRTC-VideoRateControl`.

The hysteresis parameters in `WebRTC-StableTargetRate` are currently
left, their future is unclear...

Bug: webrtc:9734
Change-Id: I9e6bbe4b630a0501d365bf69e87e65164c500122
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269207
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37635}
2022-07-28 07:23:19 +00:00
Erik Språng
93b107d0f0 Remove unused field trial WebRTC-JitterUpperBound
Bug: webrtc:9898
Change-Id: I89f2baca9b96fc00fc73d24086e7c6f5ed8307a8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269401
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37620}
2022-07-26 10:21:04 +00:00
Danil Chapovalov
6e7c2685e3 Allow recursive check for RTC_DCHECK_RUN_ON macro
instead of using Lock/Unlock attributes, use Assert attribute to annotate code is running on certain task queue or thread.

Such check better matches what is checked, in particular allows to
recheck (and thus better document) currently used task queue

Bug: None
Change-Id: I5bc1c397efbc8342cf7915093b578bb015c85651
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269381
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37619}
2022-07-26 09:27:23 +00:00
Ali Tofigh
98bfd99151 Use consistent syntax for constructing std::strings from absl::string_views
Bug: webrtc:13579
Change-Id: Ifaf9901972a39217accd9ef0111f01de9f074058
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269080
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37602}
2022-07-23 00:18:31 +00:00
Danil Chapovalov
7e8299b62e In rtc::Thread delete legacy implementation of the task queue
Bug: webrtc:14245
Change-Id: Ic0ad82f0eb2186367e794bbdc122de5b2f49204a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268902
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37600}
2022-07-22 19:48:22 +00:00
Mirko Bonadei
082d270b31 Remove leftover from previous cleanup.
See https://webrtc-review.googlesource.com/c/src/+/269180.

A default ctor was left behind in the version without logs enabled.

Bug: None
Change-Id: I27826928fe702c1d50f6ed823def9f5f0bb9aee8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269248
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37594}
2022-07-22 11:03:07 +00:00
Mirko Bonadei
5afcc9afae Remove deprecated LogMessage ctor.
This ctor has been deprecated for a while and it should be unused
by WebRTC clients.

Bug: None
Change-Id: I7d33ae24eefafe48924011f55fb53150b717d593
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269180
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37584}
2022-07-21 10:33:15 +00:00
Danil Chapovalov
3c06cfc96a Update TaskQueueWin implementation to absl::AnyInvocable
Bug: webrtc:14245
Change-Id: I4203f4dbbdc9c2ee4a6440942215341182f180db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269000
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37571}
2022-07-20 12:49:44 +00:00
Danil Chapovalov
ba5700171f Update TaskQueueStdlib implementation to absl::AnyInvocable
Bug: webrtc:14245
Change-Id: Ic0c55cbb4dbdd31359bbe15f1acd7a2b7e9e61f7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268901
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37568}
2022-07-20 09:38:21 +00:00
Danil Chapovalov
c05a1be5b4 Migrate remaining webrtc usage of TaskQueueBase to absl::AnyInvocable
Bug: webrtc:14245
Change-Id: I8de2c23da5fbdfc0b1efbbe07fb6e8de744424a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268191
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37565}
2022-07-20 08:15:08 +00:00
Daniel.L (Byoungchan Lee)
489f648ea3 Remove the deprecated BasicNetworkManager constructor
Bug: webrtc:13145
Change-Id: I43696aea7256d3fe94a11514ea6d81e3c3ac5f57
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268780
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Auto-Submit: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37564}
2022-07-20 08:14:04 +00:00
Danil Chapovalov
30c2a31309 Update TaskQueueLibevent implementation to absl::AnyInvocable
Bug: webrtc:14245, webrtc:12889
Change-Id: I1aa20e3d5645c270abd1bee0c45c6982e799eaa4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268767
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37563}
2022-07-20 07:55:43 +00:00
Danil Chapovalov
5286dcfab6 Migrate rtc_base and rtc_tools to absl::AnyInvocable based TaskQueueBase interface
Bug: webrtc:14245
Change-Id: I71abe3db7a23ad33bd175297e23fa8e927fa9628
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268768
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37553}
2022-07-19 10:57:42 +00:00
Stephan Hartmann
6dcd43f1e4 GCC: make UnitBase::operator*(double) constexpr
cricket::Interpolate Interpolate is constexpr and therefore requires
UnitBase::operator* to be constexpr too. For consistency mark UnitBase::operator/ constexpr as well.

Bug: chromium:819294
Change-Id: I6f1bf812a452de3307b0720a00b85a127631992e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268186
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37495}
2022-07-08 13:21:51 +00:00
Danil Chapovalov
fcfa80fe91 Update TaskQueueGcd implementation to absl::AnyInvocable
Bug: webrtc:14245
Change-Id: Ie9bd6d218147f002772820e20972ba8eabdd581f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268181
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37493}
2022-07-08 12:33:45 +00:00
Danil Chapovalov
4bcf809df7 In rtc::Thread implement posting AnyInvocable
Lots of code call rtc::Thread directly instead of through TaskQueueBase
interface, thus to continue migration step by step rtc::Thread needs
to implement both old and new TaskQueueBase interfaces.

Bug: webrtc:14245
Change-Id: Ie7cac897a4c8a6227b8d467a39adb30aec6f1318
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267984
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37474}
2022-07-07 07:40:14 +00:00
Danil Chapovalov
dde7fe4fc5 Refactor RepeatingTask to use absl::AnyInvocable functions of TaskQueue
Bug: webrtc:14245
Change-Id: Ie02755a4bb732cc25b3a22511e6d8920fc434c65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267847
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37461}
2022-07-06 10:15:53 +00:00
Danil Chapovalov
a7e15a2b7e Introduce helper to guard an invocable with a safety flag
This helper suppose to replace ToQueuedTask when calls to TaskQueueBase interfaces are converted to PostTask variants that take absl::AnyInvocable.

Bug: webrtc:14245
Change-Id: I590a6ca068cf5e682ffb34770bd54cf5ce37d826
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267706
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37449}
2022-07-05 15:45:23 +00:00
Byoungchan Lee
3e4e05d28b Use generate_stubs without //base dependency
For this I added a header called no_cfi_icall.h and use it.
Also, some files use the gio header, but if the //base dependency is
not used, compilation errors occur. So I added an explicit dependency
on gio.

Bug: webrtc:13662
Change-Id: If732ede202dd413be6702bf06bf024cd203fdae2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267340
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37395}
2022-07-01 10:50:54 +00:00
Danil Chapovalov
4b97928b30 Refactor RepeatingTaskHandle to use absl::AnyInvocable
Allow to use AnyInvocable in webrtc.
Demonstrate how AnyInvocable can make interface clearer to read and implement
Demonstrate that AnyInvocable can reduce binary size

Bug: None
Change-Id: I33cf33fac6ed3bf4c5e46077d1cd984ca0f253a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267165
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37380}
2022-06-30 12:22:17 +00:00
Byoungchan Lee
d69a726989 Make WebRTC use third_party/libevent rather than base/third_party/libevent
Bug: chromium:1335194
Change-Id: I084b391b42e2496163ea625c0bdc9255177e5603
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266680
Auto-Submit: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37375}
2022-06-30 07:43:49 +00:00
Jim Gustafson
7b1353209a Update trust roots for TLS support 2022-06-28 13:16:42 -07:00
Niels Möller
7a66900683 Delete rtc_base/atomic_ops.h
Bug: webrtc:9305
Change-Id: I3e8b0db03b84b5361d63db31ee23e6db3deabfe4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266497
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37348}
2022-06-28 08:32:13 +00:00
Philipp Hancke
117e692a7d tls: add logging of expected/received hashes on failures
BUG=None

Change-Id: I8e9a4e69c520e1ee1edeb7f45f039f2cda400a50
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265869
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37268}
2022-06-19 22:33:10 +00:00
Danil Chapovalov
ef9bcd17a5 Make webrtc units division by integer constexpr
std::round is not constexpr until c++23 and force conversion to floating point which is unnecessary for integer devision

For integer division change rounding to 'round down' from 'round to nearest' as less surprising.

Bug: webrtc:13756
Change-Id: I9c2382bafc9ddccb0f54d6e7bf8cac4f2a3175a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265863
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37250}
2022-06-17 10:34:09 +00:00
Artem Titov
c374d11fac Move to_queued_task.h and pending_task_safety_flag.h into public API
Bug: b/235812579
Change-Id: I9fa3dc4a65044df8b44fff4e9bfeac7233fa381c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266080
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37248}
2022-06-17 09:20:39 +00:00
Niels Möller
105711e9ad Move rtc::make_ref_counted to api/
Bug: webrtc:12701
Change-Id: If49095b101c1a1763c2a44a0284c0d670cce953f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265390
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37219}
2022-06-15 09:47:38 +00:00
Tommi
7ef4f514c5 [MessageHandler] Remove rtc::MessageHandler inheritance from StunRequest
This removes MessageHandler and Thread dependencies from StunRequest
and StunRequestManager. Instead the TaskQueueBase abstraction is
used for async posting and synchronous Clear() operations removed by
using a pending task safety flag.

Bug: webrtc:9702
Change-Id: I6e9ed5e1b4c446fd1f91af06e3ab36bccb5d7320
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265060
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37218}
2022-06-15 08:42:48 +00:00
Niels Möller
bed8507b95 Delete almost unused utility rtc::Ref
Instead, use explicit declaration
scoped_ref_ptr<FinalRefCountedObject<Event>> in AsyncInvoker classes.

Bug: webrtc:12701
Change-Id: I7ce43e2dc99a51b610852b4feda79e4bf86ee4ea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265803
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37210}
2022-06-14 13:44:37 +00:00
Markus Handell
9a665402d7 Reland "TaskQueue: unexpose delayed task convenience methods."
This reverts commit 4cd3a0d082.

Reason for revert: Downstream build should be fixed.

Original change's description:
> Revert "TaskQueue: unexpose delayed task convenience methods."
>
> This reverts commit 08bb6295ea.
>
> Reason for revert: Breaks downstream tests
>
> Original change's description:
> > TaskQueue: unexpose delayed task convenience methods.
> >
> > Bug: webrtc:14165
> > Change-Id: Ieb8580670e9e521580afd68cca6ff631fb6df3f8
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265400
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Auto-Submit: Markus Handell <handellm@webrtc.org>
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#37166}
>
> Bug: webrtc:14165
> Change-Id: Ia7368cf205622be448ec0ead5d22f211aa071a29
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265411
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Owners-Override: Björn Terelius <terelius@webrtc.org>
> Auto-Submit: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37167}

Bug: webrtc:14165
Change-Id: I3d963d272e8a1431103a5d5fb4568ccacd81119c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265395
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37186}
2022-06-13 07:27:37 +00:00
Björn Terelius
4cd3a0d082 Revert "TaskQueue: unexpose delayed task convenience methods."
This reverts commit 08bb6295ea.

Reason for revert: Breaks downstream tests

Original change's description:
> TaskQueue: unexpose delayed task convenience methods.
>
> Bug: webrtc:14165
> Change-Id: Ieb8580670e9e521580afd68cca6ff631fb6df3f8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265400
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Auto-Submit: Markus Handell <handellm@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37166}

Bug: webrtc:14165
Change-Id: Ia7368cf205622be448ec0ead5d22f211aa071a29
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265411
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Björn Terelius <terelius@webrtc.org>
Auto-Submit: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37167}
2022-06-09 15:48:23 +00:00
Markus Handell
08bb6295ea TaskQueue: unexpose delayed task convenience methods.
Bug: webrtc:14165
Change-Id: Ieb8580670e9e521580afd68cca6ff631fb6df3f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265400
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Markus Handell <handellm@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37166}
2022-06-09 14:08:54 +00:00
Niels Möller
f1d822b03b Delete variant of rtc::split that copies the output fields
Bug: webrtc:13579
Change-Id: I065a32704d48d5eed21aee0e9757cac9ecf7aa99
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261951
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ali Tofigh <alito@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37160}
2022-06-09 08:29:33 +00:00
Byoungchan Lee
d197e0b876 Reland "Don't create PacketSocketFactory inside BasicPortAllocatorSession"
This is a reland of commit 7d4634cef7

Original change's description:
> Don't create PacketSocketFactory inside BasicPortAllocatorSession
>
> This extends AlwaysValidPointer to avoid creating a unique_ptr inside it.
>
> Bug: webrtc:13145
> Change-Id: I73a4f18d0a7037b57f575b04b134e4f7eadceb79
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263240
> Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37048}

Bug: webrtc:13145
Change-Id: Iec8091ada5862cb6aa48d45b2a426c05bda798f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264826
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Owners-Override: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37138}
2022-06-07 11:24:16 +00:00
Justin Cohen
45d66a59d6 Fix usage of sprintf.
sprintf is marked as deprecated with Xcode 14.

Bug: chromium:1331345
Change-Id: Ib7eb7ab829457f3ef5fcad44b43fe827359ad7d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265200
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Justin Cohen <justincohen@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37136}
2022-06-07 07:14:06 +00:00
Christoffer Jansson
25361a89dd Revert "Reland "Don't create PacketSocketFactory inside BasicPortAllocatorSession""
This reverts commit a8be79ce27.

Reason for revert: Downstream projects were not fixed and I was to eager to reland this, sorry about this.

Original change's description:
> Reland "Don't create PacketSocketFactory inside BasicPortAllocatorSession"
>
> This is a reland of commit 7d4634cef7
>
> Original change's description:
> > Don't create PacketSocketFactory inside BasicPortAllocatorSession
> >
> > This extends AlwaysValidPointer to avoid creating a unique_ptr inside it.
> >
> > Bug: webrtc:13145
> > Change-Id: I73a4f18d0a7037b57f575b04b134e4f7eadceb79
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263240
> > Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> > Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#37048}
>
> Bug: webrtc:13145
> Change-Id: I7d64c25b2942b392a1c35ff2fe1edc83d7b03746
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264503
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
> Commit-Queue: Christoffer Jansson <jansson@webrtc.org>
> Reviewed-by: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
> Cr-Commit-Position: refs/heads/main@{#37088}

Bug: webrtc:13145
Change-Id: Ie7990bae9a7c864ffaa4eb5b637618caad509633
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264823
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Christoffer Jansson <jansson@webrtc.org>
Owners-Override: Christoffer Jansson <jansson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37089}
2022-06-02 09:45:16 +00:00
Byoungchan Lee
a8be79ce27 Reland "Don't create PacketSocketFactory inside BasicPortAllocatorSession"
This is a reland of commit 7d4634cef7

Original change's description:
> Don't create PacketSocketFactory inside BasicPortAllocatorSession
>
> This extends AlwaysValidPointer to avoid creating a unique_ptr inside it.
>
> Bug: webrtc:13145
> Change-Id: I73a4f18d0a7037b57f575b04b134e4f7eadceb79
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263240
> Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37048}

Bug: webrtc:13145
Change-Id: I7d64c25b2942b392a1c35ff2fe1edc83d7b03746
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264503
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@webrtc.org>
Reviewed-by: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#37088}
2022-06-02 09:31:06 +00:00
Jonas Oreland
61dbcd115a Rewrite "Reset all maps in AndroidNetworkMonitor Start()/Stop()"
This reverts commit 8cd7b0a7ba.

The assumption in AndroidNetworkMonitor that an interface name
is unique has turned out to be incorrect :( for some (weird) devices,
i.e ccmni0.
It is unclear if it is a permanent setup or a transient state.

This cl/ changes the impl. to cope with that, the last
OnNetworkConnected_n "owns" the interface name, and when
OnNetworkDisconnected_n runs, we check if we're "owner"
and maybe set a new "owner" (if we're not "owner" we do nothing).

New testcases added.

I also
1) change NetworkMonitorInterface to return a struct
with all the information that is requested with interface name
as key.
2) Change Network.cc adding (debug) assertions that network
properties can't change inside a loop (in one thread).

Original change's description:
> Revert "Reset all maps in AndroidNetworkMonitor Start()/Stop()"
>
> This reverts commit 02293096f9.
>
> Reason for revert: mysterious crashes in android_network_monitor.cc
>
> Original change's description:
> > Reset all maps in AndroidNetworkMonitor Start()/Stop()
> >
> > This cl/ fixes another race condition with the recent additions
> > to NetworkMonitorAutoDetect (getAllNetworksFromCache).
> >
> > The getAllNetworksFromCache-feature uses the by the Android team
> > preferred way of enumerating networks, i.e to register network listeners.
> >
> > Th recent fix to add IsAdapterAvailable, https://webrtc-review.googlesource.com/c/src/+/257400
> > contained a bug in that the adapter_type_by_name_ map was not
> > reset either on disconnect or Start/Stop.
> >
> > This cl/ addresses that including unit test.
> > It also de-obfuscates NetworkMonitor so that it always
> > calls NotifyOfActiveNetworkList on startMonitoring even
> > if list.size() == 0. This should not matter but makes
> > code easier to understand.
> >
> > Bug: webrtc:13741
> > Change-Id: I438b877eebf769a8b2e7292b697ef1c0a349b24f
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258721
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#36530}
>
> Bug: webrtc:13741
> Change-Id: I36fbf63f658d3e8048e13959cbebfbd14df12b14
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264146
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37016}

Bug: webrtc:13741
Change-Id: Ib4eb072b775e493b564528f0be94c685b70ec20f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264421
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37056}
2022-05-31 10:49:55 +00:00
Christoffer Jansson
6b9e040ab2 Revert "Don't create PacketSocketFactory inside BasicPortAllocatorSession"
This reverts commit 7d4634cef7.

Reason for revert: Breaks downstream project.

Original change's description:
> Don't create PacketSocketFactory inside BasicPortAllocatorSession
>
> This extends AlwaysValidPointer to avoid creating a unique_ptr inside it.
>
> Bug: webrtc:13145
> Change-Id: I73a4f18d0a7037b57f575b04b134e4f7eadceb79
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263240
> Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37048}

Bug: webrtc:13145
Change-Id: Iacddd280f9f27b703f2a03ee568722aed8d3abc1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264463
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Christoffer Jansson <jansson@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37053}
2022-05-31 09:22:24 +00:00
Byoungchan Lee
7d4634cef7 Don't create PacketSocketFactory inside BasicPortAllocatorSession
This extends AlwaysValidPointer to avoid creating a unique_ptr inside it.

Bug: webrtc:13145
Change-Id: I73a4f18d0a7037b57f575b04b134e4f7eadceb79
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263240
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37048}
2022-05-31 00:58:04 +00:00
Niels Möller
e66b83f8ad Never pass a signed char to ctype macros like isdigit()
Bug: None
Change-Id: I451bb2c1f175a77aefbc8363009bf35a769fe941
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264442
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37037}
2022-05-30 13:05:03 +00:00
Jianhui Dai
8712d0b150 Include all trace categories for internal usage
This CL adds a parameter to include `TRACE_DISABLED_BY_DEFAULT`
categories for internal usage. Tentatively set it by default.

Bug: webrtc:14080
Change-Id: I62a1a437b8d144b86bc5017e20e2f35e042ad2cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260664
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36966}
2022-05-23 09:10:36 +00:00
Niels Möller
83830f316e Delete TestListener and top-level thread wrapping.
Instead use rtc::AutoThread in tests that need that.

Bug: webrtc:9714
Change-Id: I1f33b1b2d321770d062504dd9ef86d66a345dd42
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254681
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36950}
2022-05-20 15:21:21 +00:00
Niels Möller
9aa46c6572 Delete rtc::join
Define a local function in the only place where it is used, for calling
SSL_set1_curves_list.

Bug: webrtc:6424
Change-Id: I7b9c372aaed15dbc88ced55652f5afd93db55e49
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261313
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36853}
2022-05-11 14:37:04 +00:00
Ali Tofigh
e00d7d0ce6 Adopt absl::string_view in CopyOnWriteBuffer
Bug: webrtc:13579
Change-Id: Ia2b99a28ed0c103215e8616da67a5c961b957199
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260465
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36832}
2022-05-10 10:32:41 +00:00
Danil Chapovalov
adaf511221 Extend UnitBase multiplication to support size_t
Bug: None
Change-Id: I8dcb85cdb2819df54d4cb0cae59b77d7d629123a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260941
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36828}
2022-05-10 07:41:30 +00:00
Niels Möller
ea1e6f44f8 Delete rtc_base/format_macros.h
It defined RTC_PRIuS, which was needed for compatibility with MSVC
prior to version 2015.

Bug: webrtc:6424
Change-Id: I5668d473376201cad3e8da65927c967fc397804b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261314
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36814}
2022-05-09 12:03:21 +00:00
Tommi
624340b32f Add test for StringFormat and string_view
Bug: none
Change-Id: Ibc366dc30f0fc8ef098e66b8ffd982c0046db6d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261449
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36805}
2022-05-08 09:13:53 +00:00
Peter Kasting
662d7f11d5 Fixes to support building in -std=c++20 mode.
* Structs with user-declared constructors are no longer considered
  aggregates, so remove the declarations when possible
* Types of both arguments to "==" must match to avoid "ambiguous
  function call" warning
* Various types of math involving enums are deprecated, so replace with
  constexprs where necessary
* ABSL_CONST_INIT must be used on definition as well as declaration
* volatile memory may no longer be read from and written to by the same
  operator, so replace e.g. "n++" with "n = n + 1"
* Replace an outdated check for no_unique_address support with
  __has_cpp_attribute
* std::result_of(f(x)) has been removed, replace with
  std::invoke_result(f, x)

Bug: chromium:1284275
Change-Id: I77b366ab1da7eb2c1e4c825b2714417c31ee5903
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261221
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Tomas Gunnarsson <tommi@google.com>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36786}
2022-05-05 17:15:58 +00:00
Florent Castelli
26d12fcc71 Remove rtc_base:rtc_base_approved
It's now empty, let's remove it!

Bug: webrtc:9838
Change-Id: I4b3310e882ea95fdf47903f9ad31e2efb35703f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261242
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36774}
2022-05-05 09:43:31 +00:00
Florent Castelli
15a3c3fdca Split Windows code from rtc_base_approved to smaller targets
Bug: webrtc:9838
Change-Id: Ic463284fd68715fd9b8eadd50e1d25841cb60020
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261241
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36768}
2022-05-05 06:47:49 +00:00
Harald Alvestrand
00579e8bce Use AlwaysValidPointer in connection_context
This extends AlwaysValidPointer to take a lambda for its default
rather than requesting a constructor.

Bug: none
Change-Id: Ied97968c3f511af15422a1eef9801d14d4ec5b96
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260580
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36745}
2022-05-03 13:39:06 +00:00
Florent Castelli
3a9e6877e5 Cleanup rtc_base_approved target
Removed all unused or transitional parts

Bug: webrtc:9838
Change-Id: I6bc14e4e0ac09ab27e4d739ac76bb6a4dfff2cb7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260140
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36741}
2022-05-03 06:58:27 +00:00
Ali Tofigh
8fcc79b3d5 Add missing overload of LogSink::OnLogMessage()
Bug: webrtc:13579
Change-Id: If2ddff90f404361745257b0bed0951d9de0f08bf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260470
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36723}
2022-05-02 08:15:05 +00:00
Mirko Bonadei
13f9c62ec8 Fix comparator bugs which are not compliant to strict weak ordering.
See a full explanation of the problem on this blog [1] post about changing
std::sort in LLVM and relative issues uncovered.

The CompareNetwork function was violating the 4th rule of "strict weak
ordering" (Transitivity of incomparability: x == y and y == z imply x == z, where x == y means x < y and y < x are both false).

[1] - https://danlark.org/2022/04/20/changing-stdsort-at-googles-scale-and-beyond/

Bug: None
Change-Id: I7e893f0a30da31403766284823f75c45c4db91c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251681
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36711}
2022-04-29 16:00:53 +00:00
Ali Tofigh
d3890781be Adopt absl::string_view in some fakes under rtc_base/
Bug: webrtc:13579
Change-Id: I52462a0edb4fb309cea3bc27f60dc81c5ea50522
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260464
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36710}
2022-04-29 15:33:12 +00:00
Niels Möller
6228d870dc Reland "Delete deprecated versions of MergeNetworkList"
This is a reland of commit 7679e9bf07

Breakage in chrome/services/sharing/ (not built as part of webrtc
presubmit) should be fixed with
https://chromium-review.googlesource.com/c/chromium/src/+/3604642

Original change's description:
> Delete deprecated versions of MergeNetworkList
>
> Bug: webrtc:13869
> Change-Id: I6b888ba14ca664a1f28de2fb59b7d1343cb18bd8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259300
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36611}

Bug: webrtc:13869
Change-Id: I4cf0fe0f2310eabb2d0b32c6dec5f8aef64c7712
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259869
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36704}
2022-04-29 11:19:02 +00:00
Philipp Hancke
9c83d9d99e DTLS: fail the connection if DTLSv1_handle_timeout returns an error
which signals a permanent connection failure to the application

BUG=webrtc:13999

Change-Id: I7ba25db4aa9035583558a613db97561c48796c76
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260100
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#36700}
2022-04-29 05:44:42 +00:00
Niels Möller
9432768024 Prepare for deletion of implicit conversion from rtc::scoped_refptr<T> to T*
Bug: webrtc:13464
Change-Id: I4c7095d3a1c7c1a9ab609f5f1595545f6cad18db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249087
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36693}
2022-04-28 12:58:56 +00:00
Tommi
76d9c18c3a Minor tweaks to the stdlib TQ implementation.
Remove the `started_` member variable and some other minor updates to
follow conventions elsewhere in the code.

Bug: none
Change-Id: I4cbb914b39cb2e2787719b906ca937931dc3dad7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258360
Reviewed-by: Markus Handell <handellm@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36677}
2022-04-27 22:42:16 +00:00
Florent Castelli
df0cbf589f Make rtc_base_approved a rtc_source_set
A target with only header files should be a source_set.

Bug: webrtc:9838, chromium:1319559
Change-Id: Ic60ed3ac074c36bee0a16831cd463053a7d81efe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260043
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36649}
2022-04-26 06:17:29 +00:00
Evan Shrubsole
7765f9e3df Fix logging MakeVal template
Types with ToLogString implemented were not being recognized correctly.
Now types like TimeDelta and Timestamp can be logged as normal.

Change-Id: Ia15f90bdd1d63a39f7452f9b4bba178d01b74352
Bug: webrtc:13995
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259863
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36646}
2022-04-25 16:01:40 +00:00
Florent Castelli
a30aef3dea Move event_tracer out of rtc_base_approved
Bug: webrtc:9838
Change-Id: Ic3c424729b5edd3e378c4195afe33ae5c88ad491
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259312
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36637}
2022-04-24 14:47:40 +00:00
Florent Castelli
ed4aadc0a2 Move copy_on_write_buffer out of rtc_base_approved
Bug: webrtc:9838
Change-Id: Ib9a9cd3bc868e716315594c436df7e2cce0d9a5a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259311
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36636}
2022-04-24 09:51:50 +00:00
Florent Castelli
ceb7b36d3a Move byte_buffer out of rtc_base_approved
Bug: webrtc:9838
Change-Id: Ic7e912cba1218f1eed794cb8c393ac148106b16c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259310
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36634}
2022-04-23 22:47:39 +00:00
Florent Castelli
a876a92d31 Move byte_order out of rtc_base_approved
Bug: webrtc:9838
Change-Id: Ieb2fbaad8831439ca04fc5249e295c8839f6890e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259309
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36633}
2022-04-23 19:04:29 +00:00
Florent Castelli
7606375b1a Move buffer_queue out of rtc_base_approved
Bug: webrtc:9838
Change-Id: I472223685b15c46cd351fd6d9ddec837d898a0db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259308
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36632}
2022-04-23 17:31:09 +00:00
Florent Castelli
f9c5984a1d Move buffer out of rtc_base_approved
Bug: webrtc:9838
Change-Id: I14feff7b1f0182d031b6644d281be44122820ce7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259307
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36629}
2022-04-22 21:19:28 +00:00
Florent Castelli
6bb1fd358b Move rate_statistics out of rtc_base_approved
Bug: webrtc:9838
Change-Id: Ia5a45291a403097c0527d50ced85c3881653fa37
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259306
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36627}
2022-04-22 15:39:48 +00:00
Florent Castelli
58cc468d16 Move rate_tracker out of rtc_base_approved
Bug: webrtc:9838
Change-Id: If7dea8bf6ef3344286ac16b57290e557cf866f92
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259305
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36622}
2022-04-22 13:30:19 +00:00
Ilya Nikolaevskiy
2f9291c7fb Revert "Delete deprecated versions of MergeNetworkList"
This reverts commit 7679e9bf07.

Reason for revert: Breaks chromium roll (see https://ci.chromium.org/ui/p/chromium/builders/try/linux-chromeos-compile-dbg/998457/overview)

Original change's description:
> Delete deprecated versions of MergeNetworkList
>
> Bug: webrtc:13869
> Change-Id: I6b888ba14ca664a1f28de2fb59b7d1343cb18bd8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259300
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36611}

Bug: webrtc:13869
Change-Id: I781ac1980687367ee17d033f6613c2e487b7966f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259775
Auto-Submit: Ilya Nikolaevskiy <ilnik@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36621}
2022-04-22 13:24:29 +00:00
Florent Castelli
1729642b72 Move sample_counter out of rtc_base_approved
Bug: webrtc:9838
Change-Id: I9b7c65b17784ceb06e9bd371ff2170da967d8afc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258773
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36615}
2022-04-22 10:20:31 +00:00
Niels Möller
7679e9bf07 Delete deprecated versions of MergeNetworkList
Bug: webrtc:13869
Change-Id: I6b888ba14ca664a1f28de2fb59b7d1343cb18bd8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259300
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36611}
2022-04-22 07:39:48 +00:00
Florent Castelli
83a36d4f32 Move moving_max_counter out of rtc_base_approved
Bug: webrtc:9838
Change-Id: Icb74d3d93e5cbb8768b9f47757bbb3e46bb78b94
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258772
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36609}
2022-04-22 01:10:35 +00:00
Florent Castelli
31764096a5 Move mod_ops out of rtc_base_approved
Bug: webrtc:9838
Change-Id: I9d974e027f114098d87da368fad0c040c072a893
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258771
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36608}
2022-04-21 16:34:04 +00:00
Florent Castelli
7f623b05c3 Move bit_buffer out of rtc_base_approved
Bug: webrtc:9838
Change-Id: Ia6e0f1c3017a968b22fdca512ef6adb37957d777
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258769
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36604}
2022-04-21 12:42:04 +00:00
Ali Tofigh
22d094d4c9 adopt absl::string_view in rtc_base/third_party/
Bug: webrtc:13579
Change-Id: Ic0c4843f09f168b158f41df79b211ac9f7f1c3cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259301
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36591}
2022-04-20 16:13:13 +00:00
Florent Castelli
d119b9e210 Move zero_memory out of rtc_base_approved
Bug: webrtc:9838
Change-Id: I2d1507354abf208947ac299ab41abe3cfa2b4274
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258767
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36585}
2022-04-20 12:19:58 +00:00
Florent Castelli
b1dc4e43f0 Move timestamp_aligner out of rtc_base_approved
Bug: webrtc:9838
Change-Id: I4ea34fd161e321f6506f300abfd27c4be6d785d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258766
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36580}
2022-04-20 08:25:30 +00:00
Jonas Oreland
6c7f98472e WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 16/inf
This cl/ adds the feature actually injecting a FieldTrialsView into
PeerConnectionFactory, or into a PeerConnection or both.

The field trials used for a PeerConnection is those specified in
PeerConnectionDependencies. Otherwise will those from
PeerConnectionFactoryDependencies be used (and until we're finished with
this conversion, the global string fallback is used as last resort).

Note that it is currently not possible to create 2 FieldTrials
objects concurrently...due to global string,
so this cl/ is mostly (but entirely) for show, i.e one _can_
realistically inject them into a PeerConnectionFactory.


Bug: webrtc:10335
Change-Id: Id2e60525f48a1f8293c1dd0be771e3ed03790963
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258134
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36578}
2022-04-20 06:35:27 +00:00
Florent Castelli
aa6d05d268 Move location out of rtc_base_approved
Bug: webrtc:9838
Change-Id: I3510f3d01df532cb228a6cc14be830f6ab81a8e1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258764
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36576}
2022-04-19 21:57:48 +00:00
Florent Castelli
6b6085937e Move one_time_event out of rtc_base_approved
Bug: webrtc:9838
Change-Id: If85ce079e6a437337f1f780fcee0147b4e95f9cf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258765
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36575}
2022-04-19 20:09:21 +00:00
Florent Castelli
a6c10e37b0 Move strong_alias out of rtc_base_approved
Bug: webrtc:9838
Change-Id: Ifb4a8aa64bb94c9f08f7debded70e881a7fb0531
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258763
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36573}
2022-04-19 17:15:37 +00:00
Florent Castelli
71337f387e Move random out of rtc_base_approved
Bug: webrtc:9838
Change-Id: I64a5ef18c19d446139354d04aa6cb2a76d18aad0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258762
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36572}
2022-04-19 14:00:47 +00:00
Niels Möller
d959f3a665 Use std:unique_ptr for Network objects owned by the NetworkManager.
Bug: webrtc:13869, webrtc:13846
Change-Id: I699ac4774f84cf891304b9c75434301f99ca55d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258500
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36569}
2022-04-19 10:34:37 +00:00
Florent Castelli
45a0599978 Remove platform_thread from //rtc_base:rtc_base_approved public_deps
While the target has a restricted visibility, since it was in rtc_base_approved
public deps, a lot of targets were able to bypass the visibility check.
So we remove the visibility restrictions and use the dependency explicitely
everywhere instead.

Bug: webrtc:8603
Change-Id: I94a03fdf7f94c54ab72081a58dd648e2cca73d17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258944
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36566}
2022-04-18 23:12:52 +00:00
Florent Castelli
b96902d33c Remove public_deps in //rtc_base:rtc_base_unittests
Bug: webrtc:8603
Change-Id: I37db775faffaca0791d2bd4865843b5353c6e67e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258943
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36565}
2022-04-18 21:44:13 +00:00
Florent Castelli
f35611aa59 Remove public_deps from //rtc_base:rtc_json
Bug: webrtc:8603
Change-Id: Ib2232ef5d6befd3eddafa5743b686af2b4c4ca0b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258942
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36564}
2022-04-18 20:03:33 +00:00
Ali Tofigh
2ab914c6ab Adopt absl::string_view in rtc_base/ (straightforward cases)
Bug: webrtc:13579
Change-Id: I240db6285abb22652242bc0b2ebe9844ec4a45f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258723
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36561}
2022-04-17 12:11:56 +00:00
Jim Gustafson
3209a47bf5 Convert more socket errors/warnings to info level 2022-04-15 18:21:35 -07:00
Sunggook Chue
8a411c4e2c Disallow set_allow_wgc_capturer_fallback call on Win10.
There is a crash report from the Windows OS API
where it repro only win10, not a Win11.

Unfortunately, Microsoft can't access the dump file or
hasn't repro internally so we decided to disable the WGC
fallback use in the OS other than Win11 now.
Once the change (support WGC fallback) reaches to Microsoft Edge
and it produce crash report,  Edge team will take the
dump file to the Windows OS API owner for Win10 level fix (or
bring the Win11 fix to Win10).

Bug: chromium:1312937
Change-Id: I5335e2c57076d4fab08e9c74ade599259cff10d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258821
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#36558}
2022-04-15 23:41:16 +00:00
Peter Thatcher
4a2e0e5d45
Update to 4896 (M100) (#72) 2022-04-15 17:13:23 -06:00
Tomas Gunnarsson
f15189dbce [CallbackList] Use CallbackList in AsyncPacketSocket for close events.
This removes use of the SignalClose sigslot. This CL includes thread
checks for the callback list and updates some call sites to unsubscribe
from events before deletion or detaching from a socket instance.

Bug: webrtc:11943
Change-Id: Ib66d39aa5cc795b750c9e3eaa85ed6af8b55b2b5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258561
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36540}
2022-04-13 14:56:58 +00:00
Tomas Gunnarsson
9797dcd1a7 [CallbackList] Support component build
Bug: webrtc:11943
Change-Id: I2abde42d65bc66f8e026fedfc2aa26bf86e1e46d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258600
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36516}
2022-04-11 08:56:51 +00:00
Tomas Gunnarsson
8bd5d484fe [CallbackList] Allow removal from within callback.
This makes moving from sigslot to CallbackList slightly simpler in some
situations.

Bug: webrtc:11943
Change-Id: I5c6dafb8ac597a119b90b64f369fa9e6316e38da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258560
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36515}
2022-04-11 08:42:46 +00:00
Niels Möller
35716230b5 Delete deprecated dummy method GetNetworks(NetworkList* networks).
Followup to https://webrtc-review.googlesource.com/c/src/+/256967.

Bug: webrtc:13869
Change-Id: Ie929082681ab285f7e390d646cc258ad573f86c0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258133
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36497}
2022-04-08 13:22:44 +00:00
Tommi
145fdbf3b2 Explicitly disallow copy in PlatformThread
Bug: none
Change-Id: If7a7483f742ef5650b991ad659265a598b91a892
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258400
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36494}
2022-04-08 12:03:04 +00:00
Mirko Bonadei
23e4654303 Apply bugprone-stringview-nullptr.
Bug: None
Change-Id: Id6372a8a94f512fede50cdb36dc3ae378f271cee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258139
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36493}
2022-04-08 11:04:34 +00:00
Niels Möller
016ae448e0 Reland "Delete unused class GlobalMutex"
This is a reland of commit 5831afb832

Original change's description:
> Delete unused class GlobalMutex
>
> Bug: webrtc:13869
> Change-Id: Id3655bdd24630b78e83b606291605a37129fd4bc
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258131
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36478}

Bug: webrtc:13869
Change-Id: I43f41c9128fc8054fc0051cbeb4dbe5cfc91f458
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258137
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36491}
2022-04-08 10:02:08 +00:00
Artem Titov
db622c359b Revert "Delete unused class GlobalMutex"
This reverts commit 5831afb832.

Reason for revert: The code is still in use: https://ci.chromium.org/ui/p/webrtc/builders/ci/Win32%20Builder%20(Clang)/10243/overview. It wasn't detected for some reasons.

Original change's description:
> Delete unused class GlobalMutex
>
> Bug: webrtc:13869
> Change-Id: Id3655bdd24630b78e83b606291605a37129fd4bc
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258131
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36478}

Bug: webrtc:13869
Change-Id: Id44dd4f8ec31ac9e05fc0ee75b55916e627fd7bf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258135
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36480}
2022-04-07 13:38:53 +00:00
Niels Möller
2221144d01 Delete old versions of GetNetworks and GetAnyAddressNetworks
Bug: webrtc:13869
Change-Id: I8a54b875a06345ac6a762673aba9ca51d79f0a82
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256967
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36479}
2022-04-07 11:25:12 +00:00
Niels Möller
5831afb832 Delete unused class GlobalMutex
Bug: webrtc:13869
Change-Id: Id3655bdd24630b78e83b606291605a37129fd4bc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258131
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36478}
2022-04-07 11:24:02 +00:00
Florent Castelli
8d4e9fba21 Remove //api:sequence_checker from public deps
Bug: webrtc:8603
Change-Id: Ib572cdc5b5f4c1f0eb3357e5e0812fc9ce7437c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257915
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36465}
2022-04-06 14:23:50 +00:00
Florent Castelli
dd837e28fa Remove //rtc_base:timeutils from public deps
Bug: webrtc:8603
Change-Id: Iaca9356d16275a02e8842c783f259131d72ef010
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257914
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36460}
2022-04-06 11:23:21 +00:00
Florent Castelli
57aa81bce7 Remove //rtc_base:stringutils from public deps
Bug: webrtc:8603
Change-Id: Ic2dfbe28d310cb4b35983b73e895fc95e8439669
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257913
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36453}
2022-04-05 22:42:19 +00:00
Florent Castelli
e10a9f609a Remove //rtc_base:safe_conversions from public deps
Bug: webrtc:8603
Change-Id: I285ac30975039f8fe9882d1673cc8e4a615c8618
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257912
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36452}
2022-04-05 20:04:59 +00:00
Jim Gustafson
9fa95682c0
Convert more socket errors/warnings to info level 2022-04-05 12:06:33 -07:00
Florent Castelli
33d31fbc48 Remove //rtc_base:rtc_event from public deps
Bug: webrtc:8603
Change-Id: Ib99f43043da17723c939b0fe2aa9f3e515462c93
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257911
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36450}
2022-04-05 17:34:09 +00:00
Florent Castelli
f86f6f9afd Remove //rtc_base:refcount from public deps
Bug: webrtc:8603
Change-Id: Ib27a107ae809df739492846175f0e9c4af40d21a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257910
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36447}
2022-04-05 15:32:29 +00:00
Florent Castelli
4467ad7835 Remove //rtc_base:macromagic from public deps
Bug: webrtc:8603
Change-Id: I9708df48c9bde9f86ba2d1a92a278bb0d09f3865
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257909
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36444}
2022-04-05 12:36:12 +00:00
Florent Castelli
0af55ba60d Remove //rtc_base:logging from public deps
Bug: webrtc:8603
Change-Id: I2704da8618f88032adac7ae9eb2a0f47fce4a836
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257908
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36443}
2022-04-05 10:31:19 +00:00
Niels Möller
e0a92f9a42 Delete unused ScopedRegisterThreadForDebugging facility
Bug: webrtc:6424
Change-Id: I3564d204e8c886ce53e82426ef1d3896d7f6409d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258021
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36441}
2022-04-05 09:21:39 +00:00
Ali Tofigh
e73b66b147 Remove unused overload of rtc::hex_decode_with_delimiter
Bug: webrtc:13579
Change-Id: I81bff9db9327be540bbf53267e678c572e99a78f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257916
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36436}
2022-04-05 05:34:29 +00:00
Florent Castelli
bddfe0215c Remove //rtc_base:atomicops from public deps
Bug: webrtc:8603
Change-Id: If1fb37e44d5ab277e16895ca50325b3a86bd135f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257907
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36432}
2022-04-04 18:25:48 +00:00
Ali Tofigh
fd6a4d6e2a Adopt absl::string_view in rtc_base/string_encode.*
Bug: webrtc:13579
Change-Id: If52108d151a12bde0e8d552ce7940948c08cef3a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256812
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36424}
2022-04-04 12:30:56 +00:00
Niels Möller
bf4988a75e New protected method NetworkManagerBase::GetNetworksInternal
Bug: webrtc:13869
Change-Id: Ib41a705362cd45ce894db6a119226844b719b706
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257302
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36420}
2022-04-04 08:41:47 +00:00
Hans Wennborg
597e03f201 Remove set but otherwise unused variable
Recent Clang versions have enhanced -Wunused-but-set-variable which now
warns about this.

Bug: chromium:1309955
Change-Id: I7a9d2175e6314fe8133cf7a77eb00bd4a22a23c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257300
Reviewed-by: Jonas Oreland <jonaso@google.com>
Auto-Submit: Hans Wennborg <hans@chromium.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36418}
2022-04-04 08:19:05 +00:00
Evan Shrubsole
b7c15706de Fix integer-overflow in TimestampExtrapolator
The Frequency implementation does not allow for nominators as large as
those that can occur in consecutive RTP timestamps, so use double math
instead.

Bug: chromium:1310611
Change-Id: I3b239e1b84043470ca29da06728b42cd4552300f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256978
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36368}
2022-03-29 12:46:51 +00:00
Niels Möller
00b31cc72a Add (temporary) using declaration for BasicNetworkManager::GetNetworks
Needed to migrate downstream code that needs to call new signature of
BasicNetworkManager::GetNetworks(). And similarly for
GetAnyAddressNetworks.

Bug: webrtc:13869
Change-Id: I8b9e842e74e290662c0713846dc29ac739d76ba2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256977
Auto-Submit: Niels Moller <nisse@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36366}
2022-03-29 11:37:01 +00:00
Jonas Oreland
e62c2f2c77 WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 12/inf
rename WebRtcKeyValueConfig to FieldTrialsView

Bug: webrtc:10335
Change-Id: If725bd498c4c3daf144bee638230fa089fdde833
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256965
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36365}
2022-03-29 10:14:00 +00:00
Jonas Oreland
c06fe8b04e WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 11/inf
convert rtc_base/network and collateral.

This also remove last usage of system_wrappers/field_trials
in p2p/...Yay!

Bug: webrtc:10335
Change-Id: Ie8507b1f52bf7f3067e9b4bf8c81a825e4644fda
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256640
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36357}
2022-03-28 15:48:01 +00:00
Niels Möller
e0c6bdf071 Use const rtc::Network* in ports and port allocator
No-try: True
Bug: webrtc:13869
Change-Id: I6004fa96278263d0d25a1446d7bb8de41a563433
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256682
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@google.com>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36353}
2022-03-28 12:48:30 +00:00
Ali Tofigh
3d6c6556b4 Adopt absl::string_view in rtc_base/string_to_number.*
Bug: webrtc:13579
Change-Id: I7e1a8ad6c493c9c0ac20c493d2467f0a2eda26d9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256720
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36340}
2022-03-25 14:32:05 +00:00
Ali Tofigh
1d6de1499c Adopt absl::string_view in testsupport/file_utils*
Bug: webrtc:13579
Change-Id: I5b710cfd218c44be01a7a42c2b281739081881e6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256280
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36332}
2022-03-25 10:34:54 +00:00
Ali Tofigh
e5b2220650 Adopt absl::string_view in rtc_base/string_utils*
Bug: webrtc:13579
Change-Id: I2def83ae546156ff0ec8ef000b7ed0c48d15777c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256721
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36329}
2022-03-25 08:12:36 +00:00
Ali Tofigh
58d861c47f Update missing absl::string_view adoption in openssl files under rtc_base/
Bug: webrtc:13579 webrtc:13870
Change-Id: Ia549285f1a60f41397c04f7bc2acdee684544ec3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256722
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36328}
2022-03-25 08:11:17 +00:00
Evan Shrubsole
195b0a9849 Modernize TimestampExtrapolator to use correct units
* Add unit tests
* Use TimestampUnwrapper
* Follow style guide

Change-Id: I057b05faba0aeafb2830a45007474be0eca1c6e0
Bug: webrtc:13756
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256261
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36313}
2022-03-24 09:36:43 +00:00
Tommi
ccc9d979a5 Add checks for a null msg_queue_ to VirtualSocketServer.
The Thread class internally (`Thread::DoDestroy`) makes this call:
  ss_->SetMessageQueue(nullptr);

Which sets the `msg_queue_` member variable of VirtualSocketServer
to nullptr. VSS checks for this in several places, but not all. In
particular `CancelConnects()` does handle it, but Disconnect(), which
is called from the same place (VirtualSocket::Close()), is missing
this check.

This CL adds some DCHECKs to catch when a pointer might be nullptr
and also avoids dereferencing a potential nullptr deref during teardown
if `Disconnect` is called, e.g. from within `VirtualSocket::Close()`
which is called from the dtor of `VirtualSocket`.

Bug: webrtc:13864
Change-Id: I717a0f033ebf70b1f59338680957723a77ccf4ca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256600
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36312}
2022-03-24 08:18:43 +00:00
Ali Tofigh
6ceb81f62b Clean up SimpleStringBuilder after absl::string_view adoption
Bug: webrtc:13579
Change-Id: I8fdc65e19893c9a96b263bbc99c4f9139fa4b78f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256268
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36291}
2022-03-22 14:33:14 +00:00
Niels Möller
9dde120d65 Reject double RefCountedObject inheritance in rtc::make_ref_counted.
Bug: webrtc:12701
Change-Id: Ie45707e3266e6a27cae073f824a1c77707d77000
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256240
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36281}
2022-03-21 16:31:21 +00:00
Jonas Oreland
e0e91a624a AlwaysValidPointer - forwarding constructor and tests
Bug: webrtc:10335
Change-Id: I1305ccf8d4f1b25f89fef7d26b090741d5f57f7e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256106
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36264}
2022-03-19 00:31:37 +00:00
Jonas Oreland
66eb789b41 Add class for pointer or owned object.
To be used as part of field trial conversion effort.

Bug: webrtc:10335
Change-Id: Iaeff520d5a83331926ead945c9e414716e61cac8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256013
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36259}
2022-03-18 15:24:57 +00:00
Niels Möller
be74b8058b Fix spelling of receiver and transceiver.
Bug: None
Change-Id: I439e217d67283b182833e48da15af9ae367ac14e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256015
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36257}
2022-03-18 14:54:10 +00:00
Mirko Bonadei
9b88e299ba Skip NetworkTest.TestMultipleIPMergeNetworkList.
Bug: webrtc:13846
Change-Id: I6098ef931e355c1d58b661962baab4ccb28916a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256014
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36250}
2022-03-18 13:05:00 +00:00
Mirko Bonadei
b2a5785e79 Don't assume strict order of IPs
Bug: None
Change-Id: I2005a4472b8a14e03a273f430fc6986f6ec0a4bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256012
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36249}
2022-03-18 12:19:28 +00:00
Ali Tofigh
7fa9057a05 Adopt absl::string_view in function parameters under rtc_base/
This is part of a large-scale effort to increase adoption of
absl::string_view across the WebRTC code base.

This CL converts the majority of "const std::string&"s in function
parameters under rtc_base/ to absl::string_view.

Bug: webrtc:13579
Change-Id: I2b1e3776aa42326aa405f76bb324a2d233b21dca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254081
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Anders Lilienthal <andersc@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36239}
2022-03-17 15:39:26 +00:00
Niels Möller
658b88a48e Delete rtc::string_trim. Replaced with absl::StripAsciiWhitespace.
Bug: webrtc:6424, webrtc:13579
Change-Id: I222e1bfb62d5f1f1a2c74e5fce1038e04e7bebfb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255824
Reviewed-by: Ali Tofigh <alito@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36234}
2022-03-17 12:53:14 +00:00
Jim Gustafson
ad8014f0fd
Convert common error and warning logs to info severity 2022-03-15 18:34:43 -07:00
Henrik Boström
19ba552e88 Add TaskQueue::PostDelayedTaskWithPrecision helper method.
Just like the other PostTask methods, this is just short-hand for
invoking the TaskQueueBase's version of the method.

Drive-by fix: remove unnecessary return statement of void methods.

Bug: webrtc:13604
Change-Id: I3d5cae66bfa06334058386909f041916dbfa5ab8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255342
Reviewed-by: Mirko Bonadei <mbonadei@google.com>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36194}
2022-03-14 15:24:17 +00:00
Ali Tofigh
6364d0899e Adopt absl::string_view in rtc_base/log_sinks
This is part of a large scale effort to increase adoption of
absl::string_view across the WebRTC code base.

This CL adds absl::string_view versions of the OnLogMessage functions in
rtc::LogSink. The const std::string& versions are kept for now since
downstream clients use subclasses of LogSink and need to be migrated
before these are removed.

Bug: webrtc:13579
Change-Id: I57bb72ad503805ff0ca16f1d7aece2d44c65cb73
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253980
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Owners-Override: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36189}
2022-03-14 12:47:55 +00:00