Commit Graph

8 Commits

Author SHA1 Message Date
Harald Alvestrand
a7e7130d51 Deprecate the two-argument Buffer constructor
The two-argument Buffer constructor could create uninintialized data.
This refactor replaces it with CreateUninitializedWithSizeAndCapacity.

It also refactors the CopyOnWriteBuffer class to use explicit functions when creating uninitialized Buffers.

Also do some checking to ensure that SetData() always has room enough.

Bug: webrtc:42223681
Change-Id: I160c88ca41944c9888d7862e8ce46cd673417a69
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/445040
Auto-Submit: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#46890}
2026-02-13 02:40:23 -08:00
Philipp Hancke
b2ea936d33 Modernize deprecated headers in api/, pc/ and rtc_base/
Done using
  tools/clang/scripts/build_clang_tools_extra.py \
    --fetch out/Default clang-tidy clang-apply-replacements
  ninja -C out/Default
  gn gen out/Default --export-compile-commands
  cd out/Default
  tools/clang/third_party/llvm/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -p . \
    -clang-tidy-binary out/Default/tools/clang/third_party/llvm/build/bin/clang-tidy \
    -clang-apply-replacements-binary \
        out/Default/tools/clang/third_party/llvm/build/bin/clang-apply-replacements \
    -checks='-*,modernize-deprecated-headers' \
    -fix api/ pc/ rtc_base/
followed by
  git cl format
and a round of IWYU followed by more git cl format

Bug: webrtc:424706384
Change-Id: I8add6fe713fba9d6ef4cc3783bdb7e7f975aaa0a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/400921
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45182}
2025-07-21 00:02:35 -07:00
Evan Shrubsole
daf96cfd6d Migrate most of rtc_base/ to webrtc namespace
Files moved,

- boringssl_certificate.h
- buffer_queue.h
- byte_buffer.h
- data_rate_limiter.h
- recursive_critical_section.h
- dscp.h
- file_rotating_stream.h
- ifaddrs_converter.h
- log_sinks.h
- fifo_buffer.h
- memory_stream.h
- message_digest.h
- win32.h
- rate_tracker.h
- openssl_digest.h
- openssl_key_pair.h
- memory_usage.h
- ssl_certificate.h
- ssl_adapter.h
- platform_thread_types.h
- ssl_fingerprint.h
- cpu_time.h
- proxy_server.h
- boringssl_identity.h
- string_utils.h
- default_socket_server.h
- openssl_session_cache.h
- net_helpers.h
- network.h
- network_monitor_factory.h
- network_route.h
- sent_packet.h
- openssl_adapter.h
- openssl_stream_adapter.h
- operations_chain.h
- net_helper.h

No-Iwyu: ssl and socket related files don't play well it include cleaner
Bug: webrtc:42232595
Change-Id: I949cf4e8be6dab99ce170d8c7388c84fdcdd6447
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/382520
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44274}
2025-04-01 02:36:58 -07:00
Tomas Gunnarsson
b6bc09b099 Remove locks from BufferQueue (not needed).
Also remove test code that can cause leaks into production.
Add sequence checkers.

Bug: webrtc:11988
Change-Id: I67b4cec6ee77d73ccffbbc88c9081ebb3c3cc423
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185503
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32228}
2020-09-29 12:57:20 +00:00
Markus Handell
18523c34b4 Migrate rtc_base to webrtc::Mutex.
Bug: webrtc:11567
Change-Id: Ib8630e0cf1266e7c3f8ce718e1ed9f8848f42ec8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178806
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31682}
2020-07-08 20:38:54 +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
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Steve Anton
1c05765831 (3) Rename files to snake_case: move the files
Mechanically generated with this command:

tools_webrtc/do-rename.sh move all-renames.txt

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I8b05b6eab9b9d18b29c2199bbea239e9add1e690
Reviewed-on: https://webrtc-review.googlesource.com/c/115481
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26225}
2019-01-11 17:05:20 +00:00