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}
This is a safe cleanup change since top-level const applied to
parameters in function declarations (that are not also
definitions) are ignored by the compiler. Hence, such changes do
not change the type of the declared functions and are simply
no-ops.
Bug: webrtc:13610
Change-Id: Ibafb92c45119a6d8bdb6f9109aa8dad6385163a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249086
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35802}
This change creates trace events with a single parameter
composed of ClassName::Method.
The change additionally causes the duration of the proxy call to be
traced, not only the occurrence.
Fixed: webrtc:12787
Change-Id: I1689862318d4c6fc1dcef343c3ccf3ae9f7e17df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219788
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34149}
Single use replaced with snprintf (old code also uses snprintf, but
twice, via rtc::ToString).
Bug: webrtc:6424
Change-Id: Iedb30aacb351428974067141e166cbc53fdda180
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184365
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32127}
We've observed a crash on Windows when the strings are empty, skipping the conversion seems reasonable in that case.
Bug: None
Change-Id: I3acf3060a88741fb750d7a0cc02e9422713c59cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147380
Commit-Queue: Noah Richards <noahric@chromium.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28709}
This is a reland of 74b373f04a
Original change's description:
> Delete STACK_ARRAY macro, and use of alloca
>
> Refactor the few uses of STACK_ARRAY to avoid an extra copy
> on the stack.
>
> Bug: webrtc:6424
> Change-Id: I5c8f3c0381523db0ead31207d949df9a286c76ba
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137806
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28038}
Bug: webrtc:6424
Change-Id: Id635ccdfae12157cbb3ab9089c5e4a9f77f742ce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138211
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28052}
This reverts commit 74b373f04a.
Reason for revert: This breaks chromium, blocking webrtc from rolling.
...
In file included from ../../third_party/webrtc\rtc_base/strings/string_builder.h:23:
../../third_party/webrtc\rtc_base/string_utils.h(54,28): error: implicit conversion loses integer precision: 'std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >::size_type' (aka 'unsigned long long') to 'int' [-Werror,-Wshorten-64-to-32]
ws.size());
See https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8912652299012991936/+/steps/compile__with_patch_/0/stdout
Original change's description:
> Delete STACK_ARRAY macro, and use of alloca
>
> Refactor the few uses of STACK_ARRAY to avoid an extra copy
> on the stack.
>
> Bug: webrtc:6424
> Change-Id: I5c8f3c0381523db0ead31207d949df9a286c76ba
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137806
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28038}
TBR=kwiberg@webrtc.org,nisse@webrtc.org
Change-Id: I223fceab60855dde363cc9ce8375e8f5cca43c02
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:6424
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138209
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28043}
Refactor the few uses of STACK_ARRAY to avoid an extra copy
on the stack.
Bug: webrtc:6424
Change-Id: I5c8f3c0381523db0ead31207d949df9a286c76ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137806
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28038}