Commit graph

11 commits

Author SHA1 Message Date
Markus Handell
a1ceae206b Implement support for Chrome task origin tracing. #3.5/4
This CL migrates unit tests to the new TaskQueueBase interface.

Bug: chromium:1416199
Change-Id: Ic15c694b28eb67450ac99fdd56754de1246a4d95
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295621
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39434}
2023-03-01 11:11:37 +00:00
Harald Alvestrand
5ad491ec87 Remove call operator from UniqueIdGenerator classes
Call operators do not improve code clarity, and usage was moderate.

Bug: None
Change-Id: I8d86bd7d435ce88e99f4abee8ab95a336d47dc22
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292960
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39294}
2023-02-10 13:10:35 +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
Harald Alvestrand
b8f7ef1c1b Permit current queue reference to be null on sequence checker creation
This makes it not an error to bind a SequenceChecker before the
global TaskQueueBase::Current() is set.

Unbreaks the SDP integration fuzzer.

Bug: webrtc:13374
Change-Id: Ic4c23fa29f4598290cf9196550e5133ba753f44f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237620
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35341}
2021-11-15 09:39:10 +00:00
Tomas Gunnarsson
64099bcbe7 Add locking to UniqueRandomIdGenerator.
The SdpOfferAnswerHandler::ssrc_generator_ variable is used from
multiple threads.

Adding thread checks + tests for UniqueNumberGenerator along the way.

Bug: webrtc:12666
Change-Id: Id2973362a27fc1d2c7db60de2ea447d84d18ae3e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214702
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33668}
2021-04-09 10:04:25 +00:00
Jonas Olsson
a4d873786f Format almost everything.
This CL was generated by running

git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \
grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \
grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \
grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \
grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \
| xargs clang-format -i ; git cl format

Most of these changes are clang-format grouping and reordering includes
differently.

Bug: webrtc:9340
Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28505}
2019-07-08 13:45:15 +00:00
Steve Anton
2acd163448 Use Abseil container algorithms in rtc_base/
Bug: None
Change-Id: I4499adaf8e777d570a3bc119ee29727ab7c790a5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128962
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27271}
2019-03-25 22:08:06 +00:00
Elad Alon
efc9a14a2b Make UniqueNumberGenerator::AddKnownId() return a value
Make AddKnownId() return a value to indicate whether the ID was
known before, or has only been made known now.
This allows users of the class to RTC_DCHECK that no collisions
existed in their seed set, for instance.

This change is done for the following classes:
1. UniqueNumberGenerator
2. UniqueRandomIdGenerator
3. UniqueStringGenerator

Bug: None
Change-Id: I627d2821cb76aa333075e36575088d76dbeb3665
Reviewed-on: https://webrtc-review.googlesource.com/c/121780
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26621}
2019-02-09 00:55:14 +00:00
Mirko Bonadei
c84f661b10 Stop using Googletest legacy APIs.
Googletest recently started replacing the term Test Case by Test Suite.
From now on, the preferred API is TestSuite*; the older TestCase* API
will be slowly deprecated.

This CL moves WebRTC to the new set of APIs.

More info in [1].

This CL has been generated with this script:

declare -A items
items[TYPED_TEST_CASE]=TYPED_TEST_SUITE
items[TYPED_TEST_CASE_P]=TYPED_TEST_SUITE_P
items[REGISTER_TYPED_TEST_CASE_P]=REGISTER_TYPED_TEST_SUITE_P
items[INSTANTIATE_TYPED_TEST_CASE_P]=INSTANTIATE_TYPED_TEST_SUITE_P
items[INSTANTIATE_TEST_CASE_P]=INSTANTIATE_TEST_SUITE_P
for i in "${!items[@]}"
do
  git ls-files | xargs sed -i "s/\b$i\b/${items[$i]}/g"
done
git cl format

[1] - https://github.com/google/googletest/blob/master/googletest/docs/primer.md#beware-of-the-nomenclature

Bug: None
Change-Id: I5ae191e3046caf347aeee01554d5743548ab0e3f
Reviewed-on: https://webrtc-review.googlesource.com/c/118701
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26494}
2019-01-31 13:23:33 +00:00
Mirko Bonadei
739baf097b [clang-tidy] Apply performance-for-range-copy fixes.
This CL applies clang-tidy's performance-for-range-copy [1] on the
WebRTC codebase.

All changes in this CL are automatically generated by both clang-tidy
and 'git cl format'.

[1] - https://clang.llvm.org/extra/clang-tidy/checks/performance-for-range-copy.html

Bug: webrtc:10215
Change-Id: I7c83290b8866d76129bbec4e24e6701f5014102e
Reviewed-on: https://webrtc-review.googlesource.com/c/120043
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26420}
2019-01-28 09:53:50 +00:00
Amit Hilbuch
dbb49dfb27 Moving UniqueIdGenerator into rtc_base.
UniqueIdGenerator classes are useful outside the pc directory.
This change moves them to the rtc_base directory to enable code
in all directories to reference them.

Bug: None
Change-Id: I1c77da87ea26d9611f37dc1d4d2c16006a6589c6
Reviewed-on: https://webrtc-review.googlesource.com/c/119460
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26378}
2019-01-24 00:52:31 +00:00
Renamed from pc/unique_id_generator_unittest.cc (Browse further)