* IWYU export <sys/socket.h> from rtc_base/net_helpers.h.
* Add a presubmit check to ensures that <sys/socket.h> is included through net_helpers.h (expect if there is a IWYU pragma or a no-presubmit-check).
* Clean up existing includes of <sys/socket.h>
Change-Id: I4bc6cce045c046287f8f74f89edfc9321293b274
Bug: b/236227627
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362082
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#42996}
This change refactors existing self-assignments within if clauses across
the WebRTC codebase.
*Why:*
- Bug Prevention: Assignments within conditionals are frequently
unintended errors, often mistaken for equality checks.
- Clearer Code: Separating assignments from conditionals improves code
readability and reduces the risk of misinterpretation.
Change-Id: I199dc26a35ceca109a2ac569b446811314dfdf0b
Bug: chromium:361594695
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360460
Reviewed-by: Chuck Hays <haysc@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42850}
This is a reland of commit 9fcaa034bc
Original change's description:
> Remove jni_zero type aliases in jni_generator_helper.h.
>
> This CL removes some type alias from
> sdk/android/src/jni/jni_generator_helper.h and make sure all the
> jni_zero types are referred to using the jni_zero:: namespace.
>
> The goal is to remove sdk/android/src/jni/jni_generator_helper.h
> in future CLs.
>
> Bug: b/319078685, b/351773023
> Change-Id: Ief60fce3e8f301f09ac5392d143aa5a82a445bcb
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356882
> Reviewed-by: Zoé Lepaul <xalep@webrtc.org>
> Reviewed-by: Jeremy Leconte <jleconte@google.com>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42618}
No-Presubmit: True
Bug: b/319078685, b/351773023
Change-Id: I605a726788ee84efdbdc9e75098b404cbd7c1f30
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358922
Reviewed-by: Zoé Lepaul <xalep@webrtc.org>
Reviewed-by: Christoffer Dewerin <jansson@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42751}
This reverts commit 4f3d660f4f.
Reason for revert: downstream still broken
Original change's description:
> Reland "Remove jni_zero type aliases in jni_generator_helper.h."
>
> This is a reland of commit 9fcaa034bc
>
> Original change's description:
> > Remove jni_zero type aliases in jni_generator_helper.h.
> >
> > This CL removes some type alias from
> > sdk/android/src/jni/jni_generator_helper.h and make sure all the
> > jni_zero types are referred to using the jni_zero:: namespace.
> >
> > The goal is to remove sdk/android/src/jni/jni_generator_helper.h
> > in future CLs.
> >
> > Bug: b/319078685, b/351773023
> > Change-Id: Ief60fce3e8f301f09ac5392d143aa5a82a445bcb
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356882
> > Reviewed-by: Zoé Lepaul <xalep@webrtc.org>
> > Reviewed-by: Jeremy Leconte <jleconte@google.com>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#42618}
>
> Bug: b/319078685, b/351773023
> Change-Id: I604b0842d220d76c36b73d2d49bcefe0ee7ae14f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356903
> Commit-Queue: Jeremy Leconte <jleconte@google.com>
> Reviewed-by: Zoé Lepaul <xalep@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42626}
Bug: b/319078685, b/351773023
Change-Id: I9429789e44c82735305b2d0d90cbaa4891d79622
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357041
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Owners-Override: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#42627}
This is a reland of commit 9fcaa034bc
Original change's description:
> Remove jni_zero type aliases in jni_generator_helper.h.
>
> This CL removes some type alias from
> sdk/android/src/jni/jni_generator_helper.h and make sure all the
> jni_zero types are referred to using the jni_zero:: namespace.
>
> The goal is to remove sdk/android/src/jni/jni_generator_helper.h
> in future CLs.
>
> Bug: b/319078685, b/351773023
> Change-Id: Ief60fce3e8f301f09ac5392d143aa5a82a445bcb
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356882
> Reviewed-by: Zoé Lepaul <xalep@webrtc.org>
> Reviewed-by: Jeremy Leconte <jleconte@google.com>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42618}
Bug: b/319078685, b/351773023
Change-Id: I604b0842d220d76c36b73d2d49bcefe0ee7ae14f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356903
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Zoé Lepaul <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42626}
This reverts commit 9fcaa034bc.
Reason for revert: Breaks downstream project.
Original change's description:
> Remove jni_zero type aliases in jni_generator_helper.h.
>
> This CL removes some type alias from
> sdk/android/src/jni/jni_generator_helper.h and make sure all the
> jni_zero types are referred to using the jni_zero:: namespace.
>
> The goal is to remove sdk/android/src/jni/jni_generator_helper.h
> in future CLs.
>
> Bug: b/319078685, b/351773023
> Change-Id: Ief60fce3e8f301f09ac5392d143aa5a82a445bcb
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356882
> Reviewed-by: Zoé Lepaul <xalep@webrtc.org>
> Reviewed-by: Jeremy Leconte <jleconte@google.com>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42618}
Bug: b/319078685, b/351773023
Change-Id: I003acf68e2b84bd0a5cda7c7180a28bcd3ca3772
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356902
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#42619}
This CL removes some type alias from
sdk/android/src/jni/jni_generator_helper.h and make sure all the
jni_zero types are referred to using the jni_zero:: namespace.
The goal is to remove sdk/android/src/jni/jni_generator_helper.h
in future CLs.
Bug: b/319078685, b/351773023
Change-Id: Ief60fce3e8f301f09ac5392d143aa5a82a445bcb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356882
Reviewed-by: Zoé Lepaul <xalep@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42618}
since it contains helpers mostly related to cryptographically secure random numbers and strings.
BUG=webrtc:339300437
Change-Id: I10db939534b25dc792ac1600a4721d1b84521880
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352620
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42441}
with an intermediate step since Chromium depends on the openssl_stream_adapter.h which will move to the new target.
BUG=webrtc:339300437
Change-Id: Iea163e0a6e3923ce8a741a2e11e9a2a1e3f3e7a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350887
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42362}
Also remove all dependencies on rtc_media_base except for a few
that are suspected of being linker directives.
Bug: webrtc:14775
Change-Id: Ic0daf88b5422047d3ed7079ee6af9e689853310c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341461
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41886}
The feature isn't in use by Google and has proven to contain security
issues. It's time to remove it.
Bug: b/324864439
Change-Id: I80344eb2f2060469d2d69a54dc4519fdd02ab4ea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340324
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41808}
This completes the breakup of the rtc_p2p target.
Remaining cleanup is to delete the rtc_p2p target and make clients
depend on the base targets.
Bug: webrtc:15796
Change-Id: I67bbeee9abf0bb663283ec3420a9a00bd3a2436a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338340
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41683}
This takes the rest of the .cc files out of the rtc_p2p build
target, leaving only one entangled target to clean up.
Bug: webrtc:15796
Change-Id: I4312b70ffe96a8affc1a02456ac466eea05dd44c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338220
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41676}
This CL does:
- Run IWYU on the relevant elements
- Make connection depend on port_interface, not port
- Make port_allocator depend only on port
- Move some constants from port.h into p2p_constants
This allows a dependency graph without ugly groups.
Bug: webrtc:15796
Change-Id: I0ff0e14eacdfe3b230a8d84902a78eb062d6c8af
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336320
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41618}
This CL splits many of the source files in p2p:rtc_p2p into individual
compile targets.
One target - connection_and_port - was left with multiple source files
because it was too tangled to detangle at once.
Bug: webrtc:15796
Change-Id: I607417e5945306ef64335f40a0ae50f0d15dee6f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335881
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41611}
Instead of using raw pointers.
Bug: webrtc:11943
Change-Id: I39ce45868d95aca44f32cfed27c91986f9c3278a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331480
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41384}
To be submitted after downstream usage has been removed, but no earlier than December 1, 2023.
Bug: webrtc:12598
Change-Id: Id9acbac591c48c0c5883fe8f06cf6a68471b70f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323004
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41290}
StunServer is updated to ensure registring for receiving packet from the socket is happening on the same thread as where the packets are recevied.
Bug: webrtc:15368, webrtc:11943
Change-Id: I94cc3a47278d5489de7f170c8d43015d1551c437
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328120
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41219}
Update most of the webrtc tests to use EnableMediaWithDefaults instead of SetMediaEngineDefaults
Bug: webrtc:15574
Change-Id: I489a09e4ea3479dc26829ee0c1235e67bcbca7c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325485
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41059}
This removes internal usage of AsyncResolver, including from
PhysicalSocketServer.
PhysicalSocketServer was also run through IWYU.
Bug: webrtc:12598
Change-Id: I18aa6fb60e4a40face4afa0446a161379470680d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322721
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40900}
This reverts commit 7534ebd2bf.
Reason for revert: Downstream projects have been updated, try it again.
R=perkj@webrtc.org
Bug: webrtc:7452
Change-Id: Ice48a563a6da499b6050b6f6e21bb0a18cd34f57
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271841
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40386}
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}
This helps in figuring out which dependencies exist, and gets closer
to obeying the "one target per .cc file" rule.
Test failures seem unrelated, so using No-Try.
No-Try: true
Bug: webrtc:14775
Change-Id: Id25466c8b8fe628d05c819cf7c69ae6d8421c6cf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288020
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38910}
As the synchronous version only posts a task to recreate the encoder
later, it is not possible to catch errors and state changes that
could appear then.
The asynchronous version of SetParameters() aims to solve this by
providing a callback to wait for the completion of the encoder
reconfiguration, allowing any error to be propagate and subsequent
getParameters() call to have up to date information.
Bug: webrtc:11607
Change-Id: I5548e75aa14a97f8d9c0c94df1e72e9cd40887b2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278420
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38627}