Use string and span forms of ToJavaByteArray().

There are existing forms of the function that directly take string
or span arguments, so vastly simplify the existing callers.

Generally, we want to avoid explicit calls to .data() on containers
which can already implicitly convert to spans or strings, since .data()
has the potential for introducing misuse of a raw ptr.

Bug: 1490484
Change-Id: Id90851dfda7c12f2f7277ccfd56bf279ca6db3f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5231919
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Ted (Chromium) Meyer <tmathmeyer@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Richard (Torne) Coles <torne@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1252462}
NOKEYCHECK=True
GitOrigin-RevId: 52297de6ec238eb20dc707f5221fcf21d8da7230
1 file changed